Improve Links in cyclic LayeredDigraphLayout

Any suggestions on how to improve the routing of the links in this graph?
It’s LayeredDigraphLayout with cycles and some cross tree links. (cross forward in green, back links in red, other in black).

If you change both fromSpot and toSpot to be go.Spot.LeftRightSides, do you like the result?

Yes, that helps.

I’m using Two shapes for the node, (one “below” the other) so that I can set 2 portId’s on on the node, the transparent rectangle is larger that the other, how do I overlay two shapes of the same size?

Could you please start a new topic about the design of your nodes? I do not understand what you really want. Why do you need two ports? Why does one port have to be transparent?

The design of the nodes was an effort to make the links less messy. I don’t feel in this case that it is a separate topic as the topic is about improving the links and their paths. As you can see in the previous screenshot, the selected blue link/path has an odd shape.

I attempted to add a second portId to each node in order to be able to identify “backward links” and draw them differently so that the diagram is less complex. As you can see in this new screenshot, when having removed the above strategy the diagram is less understandable…

The ports were necessary in order to have the “back” links attach to the “TopBottomSides” of nodes, but the Layout Algorithm doesn’t seem to really support this.

But in this latest screenshot you no longer have colored and curved links.

1 Like