Links overlapping with Node - curve: Bezier

Hi,

I am using GoJs treelayout with GraphLinkModel to create a specific layout. We are facing some issue with link template that we need some help with. I have attached the tree in the jsfiddle link https://jsfiddle.net/02d8q6st/.

There are 2 templates we are checking out:-
In the first one with curve bezier, we have tried using routing: go.Link.AvoidsNodes but it messes the tree out pretty badly. As you can see in the diagram created the links are getting overlapped

. And it gives us a better self loop in the required node

In the second template its looks really messy and confusing its basic with routing: go.Link.AvoidsNodes enabled. But the self loop does not like the 1st one and the links are really confusing for consumer

Is there any way to clear that overlapping with the first link template?

Your graph is not tree-structured, so it should not be surprising that the results using TreeLayout involving multiple links coming into a node are not satisfactory. Have you tried setting Diagram.layout to a LayeredDigraphLayout?