Gantt charts: task dependencies

Gantt charts: task dependencies

puml.online

Introduction

Gantt charts are one of the most widely used project management visuals, showing task start dates, durations, and dependencies. This tutorial covers how to draw Gantt charts with dependencies in both PlantUML and Mermaid.

PlantUML

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
@startgantt
Project starts 2026-01-01

[Requirements analysis] is [Analyze requirements] lasts 5 days
[System design] is [Design architecture] lasts 4 days
[Prototyping] is [Prototype] lasts 6 days
[Review passed] is [Review] lasts 2 days
[Development task] is [Development] lasts 10 days
[Testing and sign-off] is [Testing] lasts 3 days
[Deploy] is [Deploy] lasts 2 days

[Requirements analysis] --> [System design]
[System design] --> [Prototyping]
[Prototyping] --> [Review passed]
[Review passed] --> [Development task]
[Development task] --> [Testing and sign-off]
[Testing and sign-off] --> [Deploy]
@enduml

Mermaid

1
2
3
4
5
6
7
8
9
10
11
12
gantt
dateFormat YYYY-MM-DD
title Task Dependencies Example

section Development
Requirements :done, a1, 2026-01-01, 5d
System Design :done, a2, after a1, 4d
Prototype :active, a3, after a2, 6d
Review : a4, after a3, 2d
Development : a5, after a4, 10d
Testing : a6, after a5, 3d
Deployment : a7, after a6, 2d

Side by side

Feature PlantUML Mermaid
Init Project starts dateFormat + title
Task syntax [Name] is [desc] lasts N days Task :key, date, dur
Dependencies --> implicit after key
Task states no built-in color done / active / crit
Parallel tasks multiple --> to same task multiple after X

Wrap-up

Both engines render Gantt charts. PlantUML uses explicit --> arrows for dependencies, making it better for complex project graphs. Mermaid uses after to implicitly chain tasks, resulting in cleaner syntax for straightforward timelines. For critical-path visualization, PlantUML’s lines are more readable.

  • Title: Gantt charts: task dependencies
  • Author: puml.online
  • Created at : 2026-09-18 09:00:00
  • Updated at : 2026-12-06 10:29:22
  • Link: https://puml.online/en/blog/gantt-dependencies/
  • License: This work is licensed under CC BY-NC-SA 4.0.
On this page
Gantt charts: task dependencies