gantt
title March release
dateFormat YYYY-MM-DD
section Shape
Write the spec :spec, 2026-03-02, 4d
Review the spec :review, after spec, 2d
section Build
Implement the API :api, after review, 5d
Implement the UI :ui, after review, 5d
section Ship
Release :milestone, ship, after api, 0d
Content calendar
A compact calendar with fixed dates and day durations. No dependencies, because the dates are chosen up front.
gantt
title Beta checkpoints
dateFormat YYYY-MM-DD
section Beta
Private beta :2026-05-04, 10d
API freeze :milestone, 2026-05-15, 0d
Public beta :milestone, 2026-05-18, 0d
What is a Gantt Chart?
A Mermaid Gantt chart is a bar schedule. dateFormat tells Mermaid how to read dates. Each task line has a label, a short id, a start, and a duration. after someId starts a task when another one finishes, which is how you encode a dependency. section groups tasks into phases. A milestone is a task with the milestone tag and a duration of 0d. Use a Gantt chart for a project plan. Use a timeline when you only need labeled events and do not care about duration.
When to use it
Use a Gantt chart for releases, migrations, and research plans where dates and dependencies matter. Use a timeline for a history or a roadmap that is a sequence of labels. Use a Kanban board when the work has columns and no dates.
Give the first task an id, then start the next task with after that id. Review :review, after spec, 2d starts the review the moment the spec task ends.
Add the milestone tag and a duration of 0d. Example: API freeze :milestone, 2026-05-15, 0d. Mermaid draws a marker instead of a bar.
Whatever you set with dateFormat. YYYY-MM-DD is the format used in the examples here. Every task date must match that pattern.
Use a Gantt chart when tasks have durations and dependencies. Use a timeline when you are placing labeled events in order and the distance between them does not represent elapsed time.
Add excludes weekends under the title. Mermaid then skips Saturday and Sunday when it lays out the axis. Task durations are still the values you wrote.
Ready to create your own gantt chart?
Open the editor with this example pre-loaded and start customizing.