Timeline vs Gantt: a decision guide

Timeline vs Gantt: a decision guide

puml.online

简介 / Introduction

Both visualize “things moving forward over time”, but they answer different questions. A timeline answers when did something happen; a Gantt chart answers how long does each task take and what does it depend on. Picking the wrong one loses information: a timeline cannot show duration, and a Gantt chart forces readers to hunt for date points inside bars. This article implements the same release plan in PlantUML and Mermaid, then gives a selection rule.

Note: PlantUML also ships a timeline keyword, but the puml.online rendering backend does not enable that diagram type (it returns a syntax error). The PlantUML example below therefore uses Gantt, which it handles very well; the PlantUML timeline syntax is listed in the comparison table.

PlantUML 版

1
2
3
4
5
6
7
8
9
10
@startgantt
title Release Plan
Project starts 2026-10-01
[Planning] lasts 5 days
[Build] lasts 10 days and starts at [Planning]'s end
[Release] lasts 2 days and starts at [Build]'s end
[Planning] is colored in LightBlue
[Build] is colored in LightGreen
[Release] is colored in LightYellow
@endgantt

The PlantUML Gantt model is task entity + duration + dependency: [Task] lasts N days defines the duration, starts at [X]'s end declares that the task starts the moment X finishes, and is colored in styles a task on its own line. Project starts pins the chart’s start date — without it PlantUML uses today as the baseline, so the axis silently drifts over time. Always write it explicitly in a document that will be re-read later.

Mermaid 版

1
2
3
4
5
6
7
8
9
10
11
timeline
title Release History
section Planning
2026-10 : Kickoff
: Requirements frozen
2026-11 : Beta
: Build
: QA
section Release
2026-12 : GA
: Production launch

A Mermaid timeline starts with the timeline keyword. Text after a colon : is the event description, and more deeply indented lines become sub-items of the previous event; section introduces a parallel group heading. It emphasizes the narrative of time point + what happened rather than the width of a task, which makes it a good fit for release history, version evolution and roadmap milestones.

对比 / Side-by-side

Feature PlantUML Mermaid
Gantt keyword @startgantt gantt
Timeline keyword timeline (not enabled on this backend) timeline
Task duration lasts 10 days 10d / 2w / 3m
Task dependency starts at [X]'s end after X
Grouping no sections, distinguish by task name section blocks
Status marking manual is colored in built-in done / active / crit
Milestones milestone milestone (or 0d duration)
Today marker draw it yourself built-in todayMarker

Selection rule: durations, dependencies and progress tracking → Gantt chart (both engines support it, Mermaid is faster to write); only date points, telling a history or milestone story → timeline (Mermaid is smoother, PlantUML needs backend support confirmed).

小结 / Wrap-up

A Gantt chart answers “how much longer?”, a timeline answers “when?”. Mermaid has complete syntax for both and renders them in a consistent style, which makes it the fastest option for documentation. PlantUML’s Gantt gives finer control over dependencies and colors, which suits formal scheduling documents. The cost of choosing wrong is missing information — a timeline drops duration, and a Gantt chart hides point events inside bars.

  • Title: Timeline vs Gantt: a decision guide
  • Author: puml.online
  • Created at : 2026-10-31 09:00:00
  • Updated at : 2026-11-26 01:07:01
  • Link: https://puml.online/blog/timeline-vs-gantt-decision-en/
  • License: This work is licensed under CC BY-NC-SA 4.0.