Note that the Diagram widget is in the community technology preview (CTP) development stage.
The Diagram widget provides a collection of built-in shapes. You can extend this collection with custom shapes.
An array of custom shape objects is accessible through the customShapes option. For each custom shape object, you can specify the type, background image, default size, text, connection points, and other settings. Note that shape images should be supplied as SVG files.
This demo shows how to populate the shape collection with custom shape types, and how to use custom shapes in the Diagram widget.