Change thickness and color of particular set of links in treemodel

Dear Friends,

Please tell me in the below diagram (iam using tree model),
https://forum.nwoods.com/uploads/db3963/original/2X/0/074ec7b6f09ade1280234d6d2488f4be455f8d38.jpeg

if I want to change a particular links (may be set of links) color and thickness is it possible? pls tell me how can I change that particular set of links color and thickness.

my doubt is, if I use graphic models I have link array and I can change like below:
diagram.model.linkDataArray[inc].strokeWidth = thick;

if it is tree model how can I fetch those links and nodes? my requirement Is, each link will be in different thickness and different colors. so if I don’t have linkdataarray how can I change?

where can I give binding?

Thanks and Regards,
Syed Abdul Rahim

Examples:
https://gojs.net/latest/intro/dataBinding.html

Dear Mr.Walter,

Greetings! iam not using graphicslinkmodel. Iam using treemodel. in treemodel we dont have link array to bind.

myDiagram.linkTemplate =
(go.Link, (go.Shape,
new go.Binding(“stroke”, “color”),
new go.Binding(“strokeWidth”, “width”),
new go.Binding(“strokeDashArray”, “dash”))
);

so pls tell me how can i bind stoke in treemodel?

Your code above used linkDataArray.

Link.data refers to the child Node.data when using a TreeModel.

Dear Mr.Walter,

in above code I put for example, we will use myDiagram.linkTemplate or LinkDataArray in graphicsLinkModel but in tree how can I I asked.

When using a GraphLinksModel, you put the properties for links on the link data objects.

When using a TreeModel, you put the properties for links on the child node data object.