This sample demonstrates reading JSON data describing the relative rankings of NFL teams during the 2015 season and generating a diagram from that data. The ranking information came from beatgraphs.com.

The JSON data is basically just a list of relationships. Unlike most model data, there are no elements describing the nodes -- the node definitions are implicit in the references from the links. Hence the Diagram.model has GraphLinksModel.archetypeNodeData set to a JavaScript object.

The node template uses the convertKeyImage function to convert the team name into a URI referring to an image on our web site.


GoJS Features in this sample

Layered Digraph Layout

This predefined layout is used for placing Nodes of a general directed graph in layers (rows or columns). This is more general than TreeLayout, as it does not require that the graph be tree-structured. More information can be found in the GoJS Intro.

Related samples