How to set StateChart linkdataarray colors?


I’m using go js stateChart(

I need linkdataarray set color. How to set link color?

I’m trying => { “from”: 1, “to”: 4, “text”: “timer”, “color”, “red” } but not working. Not set a color.

Can you help me?

First, are you debugging your code? There is a syntax error in your JavaScript object.

Second, do you have a Binding on the link’s Shape.stroke property to the data’s “color” property?

Hi, thank you for your answers

First, there is no JavaScript error in my code.
Second, Shape.stroke property every place is the same color paint.
But I need a different color paint.

I want to use the json linkdataarray object.

Is it possible?

That’s what Bindings are for. Read and

And look at, which data-binds link colors.

hi walter.
Thanks for reply.

I do what I want.

For node template color: , new go.Binding(“fill”, “color”)
For link template color: ,new go.Binding(“fill”, “color”)

thanks you.

Hi walter

How i change TextBlock color:

                  font: "bold 8pt helvetica, bold arial, sans-serif",             
                  color: "red",
                  editable: true  

color: "red " did not work.

There are at least two properties of TextBlock that you can set or bind: background and stroke.

Thank you for your reply.

good work.