How to make the highlight of the longest branch at the PERT of the chart

How to find nodes in logest branch at the PERT chart

How to make the highlight nodes ( maybe background or border color ) of the longest branch at the PERT of the chart.

Have you seen the Pert chart sample? It binds stroke and fill colors on the node template to the “critical” property. So you could have some data property you set for nodes within the longest branch.

Finding the nodes within that branch is up to you, as we don’t know your implementation.

You might be interested in the code that is in the Distances sample: Graph Distances and Paths

You probably will want to discard all of the code there that involves coming up with all possible paths.

@jhardy i use default PERT chart

As Walter said, you can implement something based on the distances sample he linked and use the algorithm to set the “critical” property.