1.need to provide the function of the shortest path between two nodes. for example
myDiagram.model = new go.GraphLinksModel(nodeDataArray, linkDataArray);
…
Dijkstra algorithm. pay attention to it is undirected graph
ref:https://github.com/chehabz/JavaScript-Dijkstra-Class
…
var link_arr = myDiagram.getShortestPath(‘node_id_start’,‘node_id_end’);
…
for(var link in link_arr){
link set colr red
link.node1 set colr red
link.node2 set colr red
}
-
need to provide the function of the full path between two( or more) nodes ,namely connected child diagram
var full_path_link = myDiagram.getfullPath([‘node_id_1’,‘node_id_2’,’…’]);