<p>I have a small script that does drawio automation <a href="https://github.com/GanizaniSitara/drawio_application_landscape" rel="nofollow noreferrer">https://github.com/GanizaniSitara/drawio_application_landscape</a></p>

CC BY-SA 4.0
2024-02-10T23:36:27.130Z
2024-02-10T23:36:27.130Z
user7660047
<p>I made this flowchart with draw.io:</p>

<p><a href="https://i.sstatic.net/DQSOf.png" rel="nofollow noreferrer"><img src="https://i.sstatic.net/DQSOf.png" alt="enter image description here"></a></p>

<p>It was the first chart I made so it took me a while to make it. I need to be able to dynamically generate variations of this diagram programmatically. I wold need to do things like change the colours of the human shapes, change the text and colours of the boxes. And the trickiest part I think would be adding more children or less children. I want to make it possible to generate diagrams that can have up to 10 children.  </p>

<p>The only image programming I have ever done was with PHP GD library, I have don't even know what modern graphics experts use for programmatically generating images. I have read about vector images that are programmed, and I read a little bit about HTML5 canvas. </p>

<p>The javascript flowchar and diagram creation frameworks seem very complicated. If I found one with this particular type of flowchart as a template I could use it, but it would still be difficult. The most ideal scenario would be if I use a visual builder program like draw.io to build a template, and it would output the raw code that I could then convert function for generating these charts dynamically. </p>

<p>Does anyone know how this can be done? There are actually lots of diagrams I need to be able to make programatically, like metabolic pathways:
<a href="https://i.sstatic.net/Iv8r4.png" rel="nofollow noreferrer"><img src="https://i.sstatic.net/Iv8r4.png" alt="enter image description here"></a></p>

<p>What would be the best way of going about generating these kinds of diagrams programatically? The first one would become a great tool for learning about genetics if I can do this. Any insight would be much appreciated. </p>

CC BY-SA 3.0
2017-04-19T12:48:16.093Z
I wouldn't worry so much about generating images directly. Rather, write an application that does what you need in whatever language feels most appropriate, then capture the rendered output to an image (e.g. similar to what happens when you click "Print" while viewing a web page). As far as what library you can or should use, I have no idea (nor is this the appropriate place to ask). The latter problem seems rather special purpose and I suspect you'll be mostly starting from scratch.
Dan
<2d-graphics><diagram>
Can draw.io type flowcharts be programmed?
John Slotsky
# Can draw.io type flowcharts be programmed?

(Asked by: username_0 on 2017-04-16)

I made this flowchart with draw.io:

[![enter image description here](https://i.sstatic.net/DQSOf.png)](https://i.sstatic.net/DQSOf.png)

It was the first chart I made so it took me a while to make it. I need to be able to dynamically generate variations of this diagram programmatically. I wold need to do things like change the colours of the human shapes, change the text and colours of the boxes. And the trickiest part I think would be adding more children or less children. I want to make it possible to generate diagrams that can have up to 10 children.

The only image programming I have ever done was with PHP GD library, I have don't even know what modern graphics experts use for programmatically generating images. I have read about vector images that are programmed, and I read a little bit about HTML5 canvas.

The javascript flowchar and diagram creation frameworks seem very complicated. If I found one with this particular type of flowchart as a template I could use it, but it would still be difficult. The most ideal scenario would be if I use a visual builder program like draw.io to build a template, and it would output the raw code that I could then convert function for generating these charts dynamically.

Does anyone know how this can be done? There are actually lots of diagrams I need to be able to make programatically, like metabolic pathways:
[![enter image description here](https://i.sstatic.net/Iv8r4.png)](https://i.sstatic.net/Iv8r4.png)

What would be the best way of going about generating these kinds of diagrams programatically? The first one would become a great tool for learning about genetics if I can do this. Any insight would be much appreciated.

**Tags:** 2d-graphics, diagram

> **Comments:**
> **username_1**: I wouldn't worry so much about generating images directly. Rather, write an application that does what you need in whatever language feels most appropriate, then capture the rendered output to an image (e.g. similar to what happens when you click "Print" while viewing a web page). As far as what library you can or should use, I have no idea (nor is this the appropriate place to ask). The latter problem seems rather special purpose and I suspect you'll be mostly starting from scratch.  

---

## 1 answers

### Answer by username_2 on 2024-02-10. Score: 0

I have a small script that does drawio automation <https://github.com/GanizaniSitara/drawio_application_landscape>


---

