Skip to content

Export Mermaid diagrams

Mermaid is the text-based diagram format that GitHub, GitLab, and most wikis render natively. Understand ships a family of Mermaid Graph interactive reports that emit a graph as Mermaid text, so you can paste an accurate diagram straight into a README, wiki page, or pull request.

Enable the ones you want in the Plugin Manager (Tools menu). They then appear under Interactive Reports → Mermaid Graph when you right-click a suitable target. There's no dedicated Mermaid export format — the report's output is Mermaid text, exported like any other report as TXT (see Export & script reports for the export and und report mechanics). From there, either copy the text straight into wherever you need a diagram — wrapped in a Markdown code fence tagged mermaid for a GitHub README, wiki page, or pull request — or rename the exported .txt file (for example to .mmd) for tools that detect Mermaid by file extension.

The Mermaid Graph reports

Report Right-click target Shows
Butterfly function, class, or file Callers and callees (or derive/include/use relations) around the entity, with forward and inverse depth options
Butterfly Compare function, class, or file The butterfly across two compared project versions; added/removed/changed items keep distinct Mermaid classDef styling
Calls With Global Objects function The call tree plus the global objects each function reads or writes
Control Flow function The function's control-flow graph, with options for source code, comments, edge labels, and clustering
Data Flow object (variable, field, macro) Data flow into and out of the object, with depth options
Object References object Who sets, uses, and modifies the object, and the callers above them
Object References Compare object Object references across two compared versions, with change styling
UML Class Diagram class, file, architecture, or the project UML class diagram of the classes in the target
UML Sequence Diagram function Call sequence from the function, with clustering and level options

Each report exposes roughly the options of the corresponding graph — depths, short/full names, filenames, unresolved entities, and so on.

Comparison variants

The Compare variants require a comparison project so Understand knows what changed between versions.

For image (PNG/SVG) exports of the native interactive graphs instead, see Export, print & script a graph.