Coloring link does not work

I’m working on example:

i modified first line in linkDataArray
{ “from”: 0, “to”: 0, “text”: “up or timer”, “curviness”: -20 },
{ “from”: 0, “to”: 0, “text”: “up or timer”, “curviness”: -20, “color”: “green” },

but link is not colored.

You need to establish a data Binding on the link’s Shape.stroke property to your data.color property.

Just add this line to your link template’s main Shape:

      . . .
        { strokeWidth: 1.5 },
        new go.Binding("stroke", "color")),
      . . .


The point of having models and data binding is so that the model data can be very simple, holding only those properties that you want to be different than normal. Furthermore, you have the flexibility to parameterize only those TextBlock or Shape or Panel properties that you want, by putting Bindings only where you need them.