I have tried this, removed all from and to spot on both link and node, but still i have all the links pointing towards the center of the box like my example. Something else i need to check?
This is my node template:
$go(go.Node, "Auto",
{ contextMenu: $go(go.Adornment) },
new go.Binding("location", "loc", go.Point.parse),
$go(go.Shape, "RoundedRectangle",
{ name: "SHAPE", fill: "white", portId: "" }
),
$go(go.Panel, "Table",
$go(go.TextBlock, { row: 0, column: 0, columnSpan: 2 },
{ font: "Bold 12pt Sans-Serif", textAlign: "center" },
new go.Binding("text", "name")),
$go(go.TextBlock, { row: 1, column: 0 },
{ font: "Bold 12pt Sans-Serif", text: "Level", alignment: go.Spot.Left }),
$go(go.TextBlock, { row: 1, column: 1 },
{ font: "Bold 12pt Sans-Serif", desiredSize: new go.Size(150, NaN), margin: 2, textAlign: "right" },
new go.Binding("text", "data", function (d) {
return d['Level'];
})),
$go(go.TextBlock, { row: 2, column: 0 },
{ font: "Bold 12pt Sans-Serif", text: "Consumption", alignment: go.Spot.Left }),
$go(go.TextBlock, { row: 2, column: 1 },
{ font: "Bold 12pt Sans-Serif", desiredSize: new go.Size(150, NaN), margin: 2, textAlign: "right" },
new go.Binding("text", "data", function (d) {
return d['Consumption'];
})))
)
And this is my link
$go(go.Link, {
contextMenu: $go(go.Adornment), reshapable: true, resegmentable: true, adjusting: go.Link.End, curve: go.Link.JumpGap
},
new go.Binding("points", "points").makeTwoWay(),
$go(go.Shape, {
name: "SHAPE", strokeWidth: 2
},
new go.Binding("stroke", "color")
),
$go(go.Shape, {
toArrow: "Triangle",
scale: 1,
segmentOrientation: go.Link.OrientAlong
},
new go.Binding("stroke", "color"),
new go.Binding("fill", "color"),
new go.Binding("visible", "toArrow")),
$go(go.Shape, {
fromArrow: "Triangle",
scale: 1,
segmentOrientation: go.Link.OrientAlong
},
new go.Binding("stroke", "color"),
new go.Binding("fill", "color"),
new go.Binding("visible", "fromArrow")))