Jump to content
Vincent Parrett

Directed Graph Layout Library for Delphi?

Recommended Posts

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.
 

[Clean]   [Build]
    |________|
         |   
     [Rebuild]   [Sign]  
         |_________|
              |
           [Deploy]

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 .

Share this post


Link to post
18 hours ago, Darian Miller said:

Synopse documentation builder has some of this built-in which might help... not sure how standalone it is.

Thanks, I'll take a look.

Share this post


Link to post

Hi,

 

I implemented Sugiyama here:

 

https://github.com/VilleKrumlinde/zgameeditor/blob/master/tools/ZDesigner/3rdparty/SugiyamaLayout.pas

 

It is fully defined in a single unit. I've used it in several projects and it is very fast, robust, and as far as I know bugfree :). Let me know if you need help with using it!

 

You create a subclass and override ExtractNodes and ApplyNodes methods. See this unit for an example (the TMyLayout class).

Edited by VilleK
  • Like 2
  • Thanks 1

Share this post


Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×