Skip to content

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).

typekeywordgood for
Flowchartnoneflows, architecture, state machines, data models
Sequencesequencewho talks to whom, in what order
Timelinetimelineroadmaps, release history, the hours of an incident
Chartchartbar, column, line, pie and donut charts
Gitgitbranches, merges, tags and cherry-picks
Mind mapmindmapideas, outlines, org charts
Tree viewtreeviewfile trees, folder layouts, a pull request's changed files
Ganttganttplans with dates, dependencies and milestones
Quadrantquadrantpriorities, effort against value, a tech radar
Kanbankanbanboards 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 diagramyuhwa diagramEdit
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.

Released under the MIT License.