How to get one horizontal line in node link when connecting multiple nodes in same level

I’m using BandedLDLayout. Currently multiple nodes links are showing based on the height of the nodes in the same level. Is it possible to have one horizontal line when connecting nodes instead of multiple horizontal lines

image

Did you want to align the y positions of the nodes in that layer (which will align the link segments), or did you want to align the y positions of the horizontal segments of the links while keeping the nodes’ centers aligned horizontally?

I want to align the Y position of the nodes. Vertically align the nodes to the top in that layer

Something like as below

image

Is your graph always tree-structured? Or do you need LayeredDigraphLayout?

This customized LayeredDigraphLayout lines up the nodes in each layer:

I’m using LayeredDigraphLayout.

In a band, there could be multiple levels(parent and 1 or more child) of nodes in a band.
If it has more than one child node, then I’m using group with tree layout

And my diagram is of LayeredDiGraph layout

With the above case, is it possible for vertically top align the nodes in each level?

Yes, by combining the two custom layouts.

Can you please help me on that

What have you tried so far?

Maybe I can get to this later when I have more time.

As per the link shared in the above thread, all the nodes aligning vertically top.

But I have tried the options suggested in the above thread. It is still not working.

In my diagram, there are multiple levels of node in a band . Is it because of that not working?

Have you specified the “band” on every node data object? BandedLDLayout depends on it – otherwise each layer will correspond with one band.

OK, I have updated BandedLayeredDigraphLayout, which now uses the separate JS file https://gojs.net/extras/BandedLayeredDigraphLayout.js