merIDK / Diagram types / Gantt chart
Mermaid Gantt chart: example and syntax
Gantt charts show a project schedule as bars on a timeline, with sections, dependencies and milestones. Because the chart is plain text, it lives next to your code and changes show up in diffs.
Open this example in the editor
Example code
gantt
title Website launch
dateFormat YYYY-MM-DD
excludes weekends
section Design
Wireframes :done, d1, 2026-01-05, 5d
Visual design :active, d2, after d1, 7d
section Build
Frontend : b1, after d2, 10d
Backend :crit, b2, after d2, 12d
section Launch
QA : q1, after b2, 4d
Go live :milestone, after q1, 0d
Result
gantt
title Website launch
dateFormat YYYY-MM-DD
excludes weekends
section Design
Wireframes :done, d1, 2026-01-05, 5d
Visual design :active, d2, after d1, 7d
section Build
Frontend : b1, after d2, 10d
Backend :crit, b2, after d2, 12d
section Launch
QA : q1, after b2, 4d
Go live :milestone, after q1, 0dSyntax quick reference
- Set the date format first:
dateFormat YYYY-MM-DD. - Task:
Name :id, 2026-01-05, 5d; chain withafter id. - Tags:
done,active,crit,milestone. excludes weekendsskips Saturdays and Sundays.
How to use it
- Open the example in the editor, or paste your own Mermaid code.
- Edit the code on the left. The preview updates as you type, and errors point to the line.
- Export SVG or PNG, copy a Markdown block for GitHub or Notion, or copy a share link.