render_diagram
Convert DGMO diagram markup into SVG or PNG images. Outputs SVG code or base64 PNG, with optional theme, palette, and size controls for 35+ diagram types.
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 (e.g. color a label with a trailing color name: "Sales red").
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| dgmo | Yes | DGMO diagram markup. Color a label by appending a lowercase color name as the trailing token (e.g. "Sales red"); capitalize ("Red") to use a color word as literal text. | |
| 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 |