render_diagram
Convert DGMO markup into SVG or PNG for flowcharts, sequence, ER, and other diagrams. Returns SVG text or base64 PNG with a temp file path.
Instructions
Render DGMO markup to SVG or PNG. Returns SVG text or base64 PNG image. When format is "png", also saves the image to a temp file and returns the path. For DGMO syntax call get_language_reference.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| dgmo | Yes | DGMO diagram markup. For syntax call get_language_reference. | |
| theme | No | Color theme | light |
| width | No | Canvas width in px. Omit to let the diagram size itself from its content. Honoured exactly by the chart types that lay their content out into the canvas (bar, line, pie and the other data charts). A chart that sizes itself from its own nodes — org, sitemap, class, er, infra and the rest of the structured family — cannot go below its content and will return a wider canvas than asked for. | |
| format | No | Output format | svg |
| height | No | Canvas height in px. Most chart types derive height from their content and ignore this; the data charts honour it. | |
| palette | No | Color palette (slate, atlas, blueprint, tidewater, nord, catppuccin, tokyo-night) | slate |