The Diagram component accepts functions as expression property values. It 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 method specifies an auto-layout algorithm type and orientation that the component uses to build diagrams.