Skip to main content

Diagrams.net

Diagrams.net renders a diagram from its native XML document.

Use this type

Use this type when diagrams.net is the source editor for the diagram.

Source format

The source format is diagrams.net XML. Enter the source in the diagram.zip editor.

Syntax essentials

  • Use an mxfile document.
  • Put each page in a diagram element.
  • Store cells in an mxGraphModel structure.
  • Keep element IDs unique inside the document.

Source structure

This source shows the document structure. It is not a complete document.

<mxfile>
<diagram name="Page-1">
<mxGraphModel>
<root>
<mxCell id="0" />
<mxCell id="1" parent="0" />
</root>
</mxGraphModel>
</diagram>
</mxfile>

The rendered view uses a complete project example for this diagram type.

Rendered exampleDrag to pan. Use the wheel or controls to zoom.
100%
This view uses the live diagram.zip renderer.

Upstream reference

Diagrams.net documentation