Highlight all the parent nodes

Is there a way to highlight all the parent nodes in a tree view when a child node is selected

Currently am using node.findTreeParentNode() to get parent, it would be better if we have something like node.findallParentNodes (like findTreeChildrenNodes) . Please advice

In a tree-structured graph, a node can have at most one parent node.

But you can do what you want. Have you read http://gojs.net/latest/intro/highlighting.html ?

Ya, I understand that a node can have only one parent node. I meant to ask, is there any way to highlight all the nodes till root starting my selected node

You’ll need to walk the tree.

This sample might also be instructive: http://gojs.net/latest/samples/distances.html