Problem with refresh link lines color and dashed

A have a problem with refresh link lines color and dashed.

  1. Create diagram and linkTemplate:
    var lineColor = “#FFFFFF”;
    var lineDashStyle = null;

$(go.Link,
$(go.Shape,{
stroke: lineColor,
strokeDashArray: lineDashStyle
}…
),

  1. After that I change lineColor, lineDashStyle and model
lineColor = "#000000";
lineDashStyle = [3, 2];
Problem: but lines are the same as was at first time :(
Question: hot to force linkTemplate to refresh or rebuild or something like that ?
how to fore diagram have to rebuild. :/
$(go.Shape,<span style="line-height: 1.4;"> {</span>stroke: lineColor, strokeDashArray: lineDashStyle })

is just a JavaScript expression that evaluates those two variables. There is no way for GoJS to know that the value of some variable has changed, since GoJS never sees those variable names.

When you want to change the appearance of a Link, you could:

a) find the Link, find the Shape inside it, and then set the Shape.stroke and Shape.strokeDashArray properties. This is demonstrated at http://gojs.net/latest/samples/processFlow.html.

b) establish a Binding of those two Shape properties on properties in your link data, which you set by calling Model.setDataProperty. This is demonstrated at http://gojs.net/latest/intro/dataBinding.html (“Changing data values”).

c) establish a Binding of those two Shape properties on properties in your
link data, which you set directly and then you call Model.updateTargetBindings on that link data object in the model.

d) establish a Binding of those two Shape properties on properties in your
link data, which you set directly and then you call Link.updateTargetBindings on the Link in the Diagram.

Thank You for all advice :) great work :)