@ajosojan wrote:
Hello,
I need to use color for stroke from nodeData for parent-child relationships.
// the representation of each label node -- nothing shows on a Marriage LinkmyDiagram.nodeTemplateMap.add("LinkLabel",
$(go.Node, { selectable: false, width: 1, height: 1, fromEndSegmentLength: 20 })); myDiagram.linkTemplate = // for parent-child relationships $(go.Link, { routing: go.Link.Orthogonal, curviness: 15, layerName: "Background", selectable: false, fromSpot: go.Spot.Bottom, toSpot: go.Spot.Top }, $(go.Shape, { strokeWidth: 2,stroke:/* **Here I need to use color from nodedata***/}) ); myDiagram.linkTemplateMap.add("Marriage", // for marriage relationships $(go.Link, { selectable: false }, $(go.Shape, { strokeWidth: 2, stroke: "blue" }) )); setupDiagram(myDiagram,[{ key: 0, n: "Aaron", s: "M", m:-10, f:-11, ux: 1, a: ["C", "F", "K"] , stroke: ""},{ key: 1, n: "Aaron-wife", s: "f", ux: 0, a: ["C", "F", "K"], stroke: "" },{ key: 2, n: "Aaron-son1", s: "M", m:1, f:0, ux: 1, a: ["C", "F", "K"], stroke: "red" },{ key: 3, n: "Aaron-son2", s: "M", m:1, f:0, ux: 1, a: ["C", "F", "K"], stroke: "yellow" }]
Posts: 6
Participants: 2
