How to bind strokeDashArray inside Treelayout

Hello guys,
i’m having some trouble in figuring this one out. I’m bulding tree layout and I need it to be dynamic. One off the things i must do is to change the outer border based on JSON data:

$(go.Shape, “RoundedRectangle”,{ name: “SHAPE”,
stroke: “black”,
strokeWidth: 1,
strokeDashArray: null,
portId: “”,
fromLinkable: true,
toLinkable: true,
cursor: “pointer”
}, new go.Binding(“fill”, “color”)),

I need to get (if possible) the strokeDashArray as a binding and I can’t find the proper way to do it. I’v unsderstood that I can not pass do this:
“nodeDataArray”: [
{“key”:“1”, “LE_name”:“Wells Fargo International Finance LLC”, “BE_id”:“31782”, “local”:“State of NY”, “designinfo”:“MATERIAL ENTITY”, “color”:“white”, dash: [2, 5]},
but shouldn’t it work like this:
“linkDataArray”: [
{“from”:“1”, “to”:“2”, “category”:“Owned”, “text”:"", “mtof”:“no”, “stroke”:“red”, “strokeWidth”:“2”, “corner”:“5”, “toArrow”:“None”, dash: [2, 5]},

I’m not of an expert with javascript… sorry and thanks for all the help.

What do you mean by the outer border of a TreeLayout? Could you provide a quick sketch/mockup of what you want?

I mean the shape outer border- I wold like that, dependending on JSON record value, to dsigna a sstrokeDashArray: null or a strokeDashArray [2, 5] (as an example).

Thank you for your time.

Add this to your nodeTemplate:

new go.Binding("strokeDashArray", "dash")

Your model can use node data like you’ve specified, with a dash property as an array.