Spacing between nodes in LayeredDigraphLayout

My application uses a LayeredDigraphLayout which may contain a lot of nodes and links. When the orientation is vertical it looks like this:

Because there are so many links it is not easy to distinguish them, event when zoomed-in.

I can drag individual nodes to increase the spacing, thus making the picture a bit clearer.

But it would be much nicer if I could simply adjust the default vertical spacing between all nodes. Is there a way to do this?

Set LayeredDigraphLayout.LayerSpacing.

Play with the properties at Class LayeredDigraphLayout | GoDiagram API

The GoDiagram property: Class LayeredDigraphLayout | GoDiagram API

I just found the solution.
The LayeredDigraphLayout has a LayerSpacing property that seems to do exactly what I want.

Is there an Event that happens after the LayerSpacing property has been set and processed?
If so I would like to add a handler for that Event.

What are you trying to achieve?

After setting the LayerSpacing property the diagram quickly responds.
However, if the diagram layout (LayeredDigraphLayout) has horizontal orientation (i.e. layoutForFlowDiagram.Direction == 0.0) and the links have LinkRouting.AvoidsNodes, then some of the links disappear. I think they are still in the model somewhere but are not displayed.

The links are some (but not necessarily all) those which are between Next Level Groups. Links between Top Level Groups remain intact.

I thought that if, once the diagram layout has finished respacing the layers, I could catch an event, then in the handler I could find all such disappeared links and cause them to redisplay.

A similar situation existed when Top Level Groups are dragged, but I fixed it by adding a handler for MyJobsFlowDiagram.SelectionMoved.

With normal flow link routing there are connections from JOBD.AB to JOBI.AA and JOBD.AC to JOBIAB

When Avoid Nodes is selected one the connections disappear and the other one looks weird
image

After incrementing layer spacing both connections disappear.
image

Sometimes one of the connections reappears after further incrementing of layer spacing.

That’s unexpected. You shouldn’t need to do any special handling of events for the links to be correctly routed.

Does it help if you set Avoidable to true on your inner group template?

If you’re able to make a reproducible sample of this, we can take a look. There may be some properties that should be set to improve things.

If you don’t want to send it via the forum, you can send it to godiagram AT nwoods.com.

I set the Outer Groups to have Avoidable = false, and the Inner Groups to have Avoidable = true.
That seems to have fixed the problem.