diagram.linkTemplate =
$(ParallelRouteLink, // the whole link panel Sample: routing: go.Link.AvoidsNodes
{ relinkableFrom: true, relinkableTo: true, reshapable: true, routing: go.Link.AvoidsNodes },
$(go.Shape,
{ strokeWidth: 2 },
new go.Binding("stroke", "color")),
$(go.Shape,
{ toArrow: "Standard", stroke: null },
new go.Binding("fill", "color")),
$(go.Panel, "Auto",
$(go.TextBlock, // the label text
{
textAlign: "center",
font: "10pt helvetica, arial, sans-serif",
stroke: "black",
margin: 4,
editable: true // editing the text automatically updates the model data
},
new go.Binding("text", "text").makeTwoWay())
)
);
diagram.linkTemplateMap.add("failedEdge",
$(ParallelRouteLink, // the whole link panel Sample: routing: go.Link.AvoidsNodes
{ reshapable: true, routing: go.Link.AvoidsNodes },
$(go.Shape,
{ strokeWidth: 2 },
new go.Binding("stroke", "color")),
$(go.Shape,
{ toArrow: "Standard", stroke: null },
new go.Binding("fill", "color")),
$(go.Panel, "Auto",
$(go.Shape, // the label background, which becomes transparent around the edges
{
fill: $(go.Brush, "Radial",
{ 0: "rgb(240, 240, 240)", 0.3: "rgb(240, 240, 240)", 1: "rgba(240, 240, 240)" }),
stroke: null
}),
$(go.TextBlock, // the label text
{
textAlign: "center",
font: "10pt helvetica, arial, sans-serif",
stroke: "black",
margin: 4,
editable: true // editing the text automatically updates the model data
},
new go.Binding("text", "text").makeTwoWay())
)
)
);
Here is an example of what Im producing now. How do I make the arrows parallel and as straight as possible? My end goal is to make sure all edges do not overlap each other. They can cross if needed buy they shouldnt be on top of each other if they can be parallel.