Timelines: Sections and Time Periods
简介 / Introduction
Timeline diagrams are commonly used to visualize project milestones, historical events, or phases in a business process. Both PlantUML and Mermaid support timeline syntax, with Section and Period grouping to improve readability. This article compares their syntax and rendering.
PlantUML Version
1 | @startuml |
PlantUML uses the timeline keyword, with events written after colons :, and time period labels prefixed with +. Sections are defined with :Section Name; statements, creating clear visual groupings.
Mermaid Version
1 | timeline |
Mermaid timelines start with the timeline keyword. A colon : separates the time label from the event description. Multiple events can stack vertically within the same period. Sections emerge naturally from the time labels.
对比 / Side-by-side
| Feature | PlantUML | Mermaid |
|---|---|---|
| Keyword | timeline |
timeline |
| Time period | +2026-01 ~ 2026-03 |
2026-Q1 : Label |
| Event description | : Event text; |
: Event text |
| Grouping | : Section Name; |
Natural via time labels |
| Span notation | ~ connects start/end |
Multiple events per period |
小结 / Wrap-up
PlantUML timelines suit scenarios requiring precise date ranges and explicit Section markers. Mermaid timelines are lighter, organizing events automatically through time labels. Both clearly convey time-based processes — pick based on your need for formatting flexibility.
- Title: Timelines: Sections and Time Periods
- Author: puml.online
- Created at : 2026-10-04 08:00:00
- Updated at : 2026-10-04 19:26:44
- Link: https://puml.online/blog/timeline-section-periods-en/
- License: This work is licensed under CC BY-NC-SA 4.0.