Click on a node to show distances from that node to each other node. Click on a second node to show a shortest path from the first node to the second node. (Note that there might not be any path between the nodes.) Clicking on a third node will de-select the first two.

Here is a list of all paths between the first and second selected nodes. Select a path to highlight it in the diagram.


GoJS Features in this sample

Collections

GoJS provides its own collection classes: List, Set, and Map. You can iterate over a collection by using an Iterator. More information can be found in the GoJS Intro.

Related samples


Force Directed Layout

This predefined layout treats the graph as if it were a system of physical bodies with forces acting on and between them. The layout iteratively moves nodes and links to minimize the total sum of forces on each node. The resulting layout will normally not contain overlapping Nodes, excluding cases where the graph is densely interconnected. More information can be found in the GoJS Intro.

Related samples


HTML Interaction

GoJS Diagrams can be used alongside other HTML elements in a webapp. For custom Text Editors, Context Menus, and ToolTips, which are invoked and hidden via GoJS tool operations, it is best to use the HTMLInfo class.

More information can be found in the GoJS Intro.

Related samples