Note that the Diagram widget is in the community technology preview (CTP) development stage.
The Diagram widget allows you to import data from a data source into a data toolbox.
Use the createDataSource method to create data toolbox items based on an external data source. End users can drag data items from the toolbox and drop them onto a canvas to build a diagram.
If a data source provides information about node relations, specify the layout option to generate a diagram automatically.