I’m trying to build a graph with tree layout structure
I have made node templated changes and also link template, still, somehow links are getting tangled or overlap each other, spacing between nodes remains same.
Not sure which property of link and node template should I use to achieve a simple design
Data I’m getting for the graph is server-side, I can not give a specific location, so the positioning of the node should be dynamic
You appear to have Groups in your Diagram – is that intentional? I do not see them in your first screenshot. If you want to have Groups but not have them be treated as Nodes when determining the layout of the whole diagram, set their Group.layout to null.
Now Tangled and overlapping links are my problem.
I want to graph to take full advantage to available space, this graph is small, I have data with 500[+] links and 20 nodes, I want to avoid links to overlap or tangle
That is the default behavior. Don’t set any fromSpot or toSpot. Don’t set Link.routing.
You could try using a ForceDirectedLayout as the Diagram.layout. But if you want to continue using a layout that produces layers, tell it not to set fromSpot or toSpot, by setting TreeLayout.setsPortSpot and TreeLayout.setsChildPortSpot to false, or by setting LayeredDigraphLayout.setsPortSpots to false.