3
$\begingroup$

I made this flowchart with draw.io:

enter image description here

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

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.

$\endgroup$
1
  • 1
    $\begingroup$ 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. $\endgroup$
    – Dan
    Commented Apr 19, 2017 at 12:48

1 Answer 1

0
$\begingroup$

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

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.