When I use AvoidsNodes for links on a graph that contains many nodes/links, the graph renders with what appear to be phantom links (links not touching any nodes). However, if you then move nodes around, you can tell that the links really do belong to nodes and they will suddenly reconnect themselves.
I did read that there is a performance issue with AvoidsNodes so this might be related. Setting the link routing to Orthogonal seems to fix the issue and we are fine with this solution. But I thought you might want to know about this issue.
The attached examples actually do not contain a lot of links/nodes, but I thought it was easier to see the issue with these screen shots.
That is the look we get with AvoidsNodes as well as Orthogonal. I assumed the only difference was that with AvoidsNodes, it would attempt to go around a node rather than having the link go behind a node?
Below is our template that works:
var linkTemplate =
GO(go.Link,
{ routing: go.Link.Orthogonal, corner: 5, layerName: "Background" },
GO(go.Shape, { strokeWidth: 3, stroke: "black" },
new go.Binding("strokeWidth"),
new go.Binding("strokeDashArray"),
new go.Binding("stroke", "isHighlighted", function (h) { return h ? defaultLinkColor : "black"; }).ofObject()),
GO(go.Shape, { scale: 2, fromArrow: "" },
new go.Binding("fromArrow"),
new go.Binding("fill", "isHighlighted", function (h) { return h ? defaultLinkColor : "black"; }).ofObject()),
GO(go.Shape, { scale: 2, toArrow: "" },
new go.Binding("toArrow"),
new go.Binding("fill", "isHighlighted", function (h) { return h ? defaultLinkColor : "black"; }).ofObject())
);