Flow Lines in different colores

I want to try the “Icons” flow diagram.
I need to mark each one of the lines in Red,Yellow or Green, conditionally.
I found that I can change the lines color per all lines, not a single one, using the linkTemplate method.
Does anyone have an idea how can I change each line color separately ?
Thanks !

Use data binding.

Please read GoJS Using Models -- Northwoods Software and GoJS Data Binding -- Northwoods Software.

Several samples also demonstrate what you are looking for.

Hi Walter
thanks for your reply.
What I need is the ability to color the arrows in the icons diagram, but each arrow will
get a different color according to the status I decide: red, yellow, green.
I see in the examples you added only coloring of the objects themselves.
You know what I mean ?
Thanks !

Consider this sample: Shop Floor Monitor, which uses data binding to show state in both the node template and the link template.