Layouting State Charts?


We are evaluating GoJS for our next product. In our current project we use Dot (GraphViz) for layouting a State Chart.

How can I do that in GoJS? Basically it is the State Chart of the provided examples but where the layouting is done with GoJS (thus avoid any crossing of links over nodes and minimize link-crossings).


for an example of dot (and what we want).



You could try setting myDiagram.layout = new go.LayeredDigraphLayout();

This would perform the layout in the browser. If you really want to continue using GraphViz on the server, you could send the data with the node locations and link routes to the browser for GoJS to render.

Hi Walter.

Thanks for your answer. I tried experimenting with LayeredDigraphLayout but with no good results (mainly because of the cycles that are present in these graphs).

We really want to get rid of GraphViz. Do you see an option?


What results did you get that you didn’t like?

Have you also tried using ForceDirectedLayout?

I don’t know if this will help but I was able to create this after a lot of experimentation. If this is sort of what you’re looking for, I’m happy to explain how I did it and provide the node templates and stuff.