Skip to content
All guides

Plan a project schedule with a Mermaid Gantt chart

Example workspace in Knotpad. Illustrative project.
Launch schedule note with a Mermaid Gantt chart of research, build and launch tasks from 26 October to a launch milestone on 30 November, weekends shaded, above the dated tasks

Example workspace in Knotpad.

A plan gets dates sooner or later: a launch day, a review that cannot start until the build is done, weekends nobody works. A task list with due dates holds all of that, but it does not show what overlaps or what moves when one task slips. A Gantt chart does.

Mermaid lets you write a Gantt chart as a few lines of text, and Knotpad draws it in the note's preview, on the web and in the desktop app, beside the tasks it plans. The examples use the launch of an illustrative customer portal project.

Write a Gantt chart

Start a code block labelled mermaid with the word gantt on its first line. Each task is one line: its name, a colon, then its tags, an id, when it starts and how long it takes.

gantt
    title Customer portal launch
    dateFormat YYYY-MM-DD
    axisFormat %d %b
    tickInterval 1week
    weekday monday
    excludes weekends

    section Research
    Customer interviews    :done, research, 2026-10-26, 8d
    Findings shared        :milestone, findings, after research, 0d

    section Build
    Request form           :active, form, after research, 5d
    Status page            :status, after form, 6d
    Status emails          :emails, after form, 3d

    section Launch
    Support guide          :guide, after emails, 4d
    Pilot with 5 customers :crit, pilot, after status guide, 5d
    Launch                 :milestone, launch, 2026-11-30, 0d

The dateFormat line says how you write dates, axisFormat how the chart labels them (%d %b gives 09 Nov), and tickInterval puts one label on each week. Each section line starts a new row of tasks.

Show what waits on what

A task can start on a date, as Customer interviews does, or after another task: after research starts the request form the day the interviews end. Name more than one task to wait for all of them, so the pilot starts only when both the status page and the support guide are done.

Change the length of the interviews and every task after them moves with it. You edit one line instead of every date.

Mark progress, milestones and critical work

  • done shows a finished task and active the one in progress.
  • crit marks work that would delay the launch if it slipped. It shows in red.
  • milestone with a length of 0d draws a diamond for a moment rather than a task, such as findings shared or launch day. A milestone can follow a task or sit on a fixed date.

A red line marks today, so you can see what should be finished by now.

Skip weekends and holidays

The excludes weekends line shades Saturdays and Sundays and leaves them out of every length, so 5d means five working days. Add dates to skip public holidays as well, for example excludes weekends, 2026-12-25.

Gantt chart or timeline

Use a Gantt chart once the dates are agreed and you need to see overlaps and knock-on effects. Before that, while you only know the order of the phases, a Mermaid timeline is quicker to keep up to date.

Ask your assistant to draw it from your tasks

Task lines in Knotpad can carry a date or a date range, such as 2026-11-12..2026-11-19, so a connected AI assistant can read the plan and turn it into a chart:

Read the Launch schedule note. Add a new section with a Mermaid Gantt chart of its tasks, using their date ranges. Mark the pilot as critical and the launch as a milestone.

On a note with the default Assistant access, the assistant adds the chart as a new section at the end. When the dates change later, edit the chart yourself, or switch the note to Full edit and ask the assistant to redraw it.

Open it full screen, copy it or put it in a slide

Click the chart to open it full screen and zoom in to read the labels. Image copies it as a picture, redrawn on a white background, so it pastes cleanly into a document, a spreadsheet or a slide. Code copies the Mermaid text, and SVG downloads the chart as a file.

What a Gantt chart in a note does not do

The chart is text you write. It does not follow your task dates or change when a task is ticked off, and you cannot drag its bars. Keep the tasks as the record of progress, and update the chart when the plan changes.

Draw a timeline when you only know the order, or connect your assistant to start.

Another view of the same project. Illustrative project.
The same Gantt chart opened full screen, with zoom controls and Image, Code and SVG buttons

Another view of the same project.

More guides

Start with one project.

The Windows app is free, with no account. Or use Knotpad in your browser on any computer.

Download for Windows

Free local workspace. No account required.

Try Pro free for 14 days

Full Personal Pro access in your browser.
No card required.

Try Pro free for 14 days

Full Personal Pro access in your browser.
No card required.

On Windows, the app is free with no account. Get the free Windows app

How to connect your assistant