Link overlapping LayeredDigraphLayout

HI!
I have a chart like this https://codepen.io/lesh1j/pen/PoONLPm - this is a live example
I’m happy with this layout.:

But, when I add a few more nodes on layer 3, node “3_1” moves down and the link between nodes “3_1” and “4_6” overlaps with others


If any solution to this problem?
Thanks

Try using the built-in Link class, not your subclass, in your link template.
The standard LayeredDigraphLayout routing will separate those overlapping link path segments.

do you mean like this?


Yes, I know that there will be no overlay with standard links.
But isn’t there a solution to have the connected nodes be opposite? As in the first picture
This link route is a must for me

In your CodePen, with the only change being the link template using Link instead of your HorizontalLink, I am getting:

Thank You
Yes, I know this option too.
That is, I cannot change the positions of the nodes in any way?
To be something like this:

Well, for that particular case, I would use TreeLayout instead of LayeredDigraphLayout.

The TreeLayout does not suit me because any node can have many parents. This is just an example. I already have a ready-made project in which a lot has been done specifically for LayeredDigraphLayout

What happens if you set LayeredDigraphLayout.packOption to go.LayeredDigraphLayout.PackStraighten?