sureish
December 14, 2018, 1:24pm
#1
Hi,
just gone through above link. Could you please help me with the option to give three different colours for three different lines in Triple Style as in below pattern I am able to pass only one color.
definePathPattern(“TripleR”, “M0 0 L1 0 M0 3 L1 3 M0 6 L1 6”, “red”);
walter
December 14, 2018, 6:12pm
#2
Use a Linear gradient Brush in the Shape.pathPattern Shape instead of a solid color. For example:
myDiagram.linkTemplate =
$(go.Link,
$(go.Shape,
{
stroke: "transparent", strokeWidth: 6, // to make it pickable
pathPattern:
$(go.Shape,
{
geometryString: "M0 0 L1 0 M0 3 L1 3 M0 6 L1 6",
fill: "transparent",
stroke: $(go.Brush, go.Brush.Linear, { 0: "red", 0.5: "green", 1: "blue" }),
strokeCap: "square"
})
})
);
produces:
sureish
December 15, 2018, 5:54am
#3
Many Thanks Walter. It worked.