Does anyone know of any Delphi libraries that tackle directed acyclic graphs (DAG) and layout algorithms? In particular I’m interested in a layered layout (Sugiyama’s algorithm).
My goal here is to produce a visual representation of a target dependency graph - something like this.
It seems like every other language out there has tons to choose from (open source to $$$$ commercial), but so far I have found nothing useful for Delphi. Of course I could attempt to translate another library to delphi… but I was hoping to avoid that if possible .
Thanks Paul - yeah graphviz is kinda the gold standard for opensource graph visualization. Hoping to avoid external dependencies. The com wrapper hasn’t been updated since 2004!
The graph/layout isn’t a tree - although it may appear that way, there can be multple disconnected branches or just individual nodes.
I removed the browser panel and replaced it with htmlcomponents - so d3.js isn’t an option (there are tons of libraries that use d3.js for rendering though).
Do you have any feeling as to whether that should be consider eg an array / collection of separate graphs … or a single, connected graph with some minimal number of connections tagged ‘not visible’ (and maybe a ‘not visible’ root node) ?
Not sure - in this case the graphi is the dependency graph of targets in FinalBuilder - targets can have dependencies (other targets) which might also have dependencies etc. The current ui isn’t conducive to showing exactly what the dependency graphi is (you have to look at each target individually) - so I would like to be able to show a view for a project that shows the graph.
For most customers the graph is pretty simple but occasionally we see customers projects and working out how it all hangs together is a challenge. Being able to just look at a visual representation would be really useful.
I’m no expert in graph theory or graph layouts, I had the idea a few days ago and spent a day researching it - longer than I expected. I’ll probably have a play with some of the js or c# libraries and then try and convert the simplest one to delphi - most libraries support multiple layout algorithms - I only need one!
that’s an option I will explore… but I kinda want it to be interactive so I can double click on a node and get the target options dialog, or click on a vertex and press delete to remove a dependency… haven’t fully thought it through yet.
I did widen my search today - found some interesting libraries for dart and flutter to look at.
In 2015 Arnaud wrote:
"In our SynProject tool, you have the ability to write DOT graphs.
It produces output like in Software Architecture Design 1.18
It can generates vectorial EMF content, and we added a SVG output for embedding into our HTML generated documentation.