Note that the Diagram widget is in the community technology preview (CTP) development stage.
This demo shows the Diagram widget's capability to load an external tree or a graph structure from two data sources: an array of shapes and an array of shape connectors. The connector is specified by the shape's ID attributes. The Diagram transforms information from the data sources into a tree layout view.
The layout option specifies an auto-layout algorithm (using a sugiyama or tree layout) that the widget uses to build a diagram.