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 GoJS Highlighting -- Northwoods Software ?

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: Graph Distances and Paths