Diagram types
Every yuhwa file draws a graph: nodes and the edges between them. The other diagram types are panels, blocks with their own small syntax. A file can hold just one of them, or a graph and any number of panels side by side (see Combining diagrams).
| type | keyword | good for |
|---|---|---|
| Flowchart | none | flows, architecture, state machines, data models |
| Sequence | sequence | who talks to whom, in what order |
| Timeline | timeline | roadmaps, release history, the hours of an incident |
| Chart | chart | bar, column, line, pie and donut charts |
| Git | git | branches, merges, tags and cherry-picks |
| Mind map | mindmap | ideas, outlines, org charts |
| Tree view | treeview | file trees, folder layouts, a pull request's changed files |
| Gantt | gantt | plans with dates, dependencies and milestones |
| Quadrant | quadrant | priorities, effort against value, a tech radar |
| Kanban | kanban | boards with columns, cards and WIP limits |
A panel starts with its keyword, an id, an optional title and props, and its body goes between { and a line that is only }:
yuhwa
chart langs "Languages" [type: donut, unit: %] {
TypeScript: 64
Rust: 21
CSS: 15
}Every panel takes the same box props (color, theme, background, border, shadow, frame: false, …) next to its own. The pages below list each panel's own syntax and props, with examples to copy.
Coming from Mermaid? Most Mermaid diagrams convert to one of these types, see From Mermaid or JSON.