The Diagram widget accepts functions as expression property values. The widget allows you to implement custom logic when you bind a diagram to a data source. In this demo, the nodes and edges collections are bound to a data source. Custom functions are used to get different shape types and font styles for items based on additional data source information.
The autoLayout option specifies an auto-layout algorithm type and orientation that the widget uses to build diagrams.