I am using TreeLayout. Following is my layout code.
go.GraphObject.make(go.TreeLayout, { nodeSpacing: 20, nodeIndent: 0, nodeIndentPastParent: 0, layerSpacing: 50, layerSpacingParentOverlap: 0, sorting: go.TreeLayout.SortingForwards, compaction: go.TreeLayout.CompactionBlock, breadthLimit: 0, rowSpacing: 25, rowIndent: 10, setsPortSpot: true, setsChildPortSpot: true, treeStyle: go.TreeLayout.StyleLastParents, layerStyle: go.TreeLayout.LayerIndividual, alignment: go.TreeLayout.AlignmentCenterChildren, angle: 90, arrangement: go.TreeLayout.ArrangementHorizontal });
The problem with this is the link passes from Node. I want that link should not pass from Node and also links should not overlap each other.
I have used AvoidNodes as well but it doesnt seems to be working in this case.
var newRouting = go.Link.AvoidsNodes;
this.diagram.startTransaction("update routing");
this.diagram.linkTemplate.routing = newRouting;
this.diagram.links.each(function (l) {
l.routing = newRouting;
});
this.diagram.commitTransaction("update routing");