timelinev0.9.4

什么是时间线?

按时代分组的事件顺序。

timeline2014v12018seq2022elk2025c4
何时使用

Use a 时间线 when…

01

Product release histories

02

Company milestone slides

03

Anything chronological without dependencies

语法基础

The minimal syntax

Copy this and you have a working 时间线. Build from here.

timeline.mmd
timeline
    title Mermaid milestones
    2014 : Initial release
    2018 : Sequence + Gantt
    2022 : ELK renderer
    2025 : Block, C4, layout API
2014v12018seq2022elk2025c4
常见写法

Patterns worth memorizing

Multiple events per year

`2024 : event A : event B` puts both events in the same column.

Sections

`section Era` groups years and applies a band color.

Mix dates and labels

You can use any string before the `:` — months, quarters, eras.

常见坑点

The things that will trip you up

Mermaid silently ignores misspellings — these are the failures we see most.

  1. 01

    No dependency arrows; for that, use Gantt.

  2. 02

    Long events overflow vertically; split into multiple rows.

  3. 03

    Date sorting is left-to-right by source order, not by parsed value.