← 所有範例

gantt-schedule

gantt
  title Mobile app release
  dateFormat YYYY-MM-DD
  axisFormat %b %d
  tickInterval 1week
  weekday monday
  excludes weekends
  todayMarker off

%% Working days only: `excludes weekends` pushes a task's end past every
%% Saturday and Sunday it would cross, and the chart shades those days.
%% `after` can name several tasks and starts where the latest of them ends,
%% so Integration waits for both API build and Screens. Ticks fall every
%% week, on a Monday, labelled by `axisFormat`. `todayMarker off` leaves out
%% the line that marks today, so the picture is the same whenever it is drawn.
%% A task's `click` works as a flowchart node's: a link or a callback.
%% A `vert` task is a vert marker: a line up the chart at its start and its
%% label below the axis, on no row. It is a timeline target by its id — the
%% author's (`gonogo`) or, written without one, Mermaid's own `taskN`, which
%% counts it like any other task written without an id (`task1` here).

  section Backend
  API design        :done, api, 2024-05-06, 4d
  API build         :crit, apiBuild, after api, 8d
  section App
  Screens           :active, screens, 2024-05-08, 7d
  Integration       :integ, after apiBuild screens, 5d
  section Release
  Beta testers      :beta, after screens, 6d
  Store review      :review, after integ, 3d
  Release           :milestone, release, after review, 0d
  Code freeze       :vert, 2024-05-20, 0d
  Go/no-go          :vert, gonogo, 2024-05-29, 0d

  click api href "https://example.com/api-spec"

timeline:
  enter api fade, enter apiBuild slide-right
  enter screens fade
  enter integ slide-right, highlight apiBuild outline, enter task1 fade
  enter beta fade, enter gonogo fade, enter review fade, unhighlight apiBuild
  enter release fade, highlight release glow