ガントチャート

ガントチャートは、SVC文型(主語-動詞-補語)の単純な文によって、自然な英語を書くように記述できます。

タスクの定義

タスクは角カッコで定義します。

期間

タスクの期間は、動詞lastで指定します。

@startgantt
[プロトタイプを設計] lasts 15 days
[プロトタイプをテスト] lasts 10 days
-- すべての例 --
[Task 1 (1日)] lasts 1 day
[T2 (5日)] lasts 5 days
[T3 (1週間)] lasts 1 week
[T4 (1週間と4日)] lasts 1 week and 4 days
[T5 (2週間)] lasts 2 weeks
@endgantt

開始

タスクの開始は、動詞startで指定します。

@startuml
[プロトタイプを設計] lasts 15 days
[プロトタイプをテスト] lasts 10 days

Project starts 2020-07-01
[プロトタイプを設計] starts 2020-07-01
[プロトタイプをテスト] starts 2020-07-16
@enduml

終了

タスクの終了は、動詞endで指定します。

@startuml
[プロトタイプを設計] lasts 15 days
[プロトタイプをテスト] lasts 10 days

Project starts 2020-07-01
[プロトタイプを設計] ends 2020-07-15
[プロトタイプをテスト] ends 2020-07-25

@enduml

開始と終了

開始と終了の両方を日付で指定することも可能です。

@startuml

Project starts 2020-07-01
[プロトタイプを設計] starts 2020-07-01
[プロトタイプをテスト] starts 2020-07-16
[プロトタイプを設計] ends 2020-07-15
[プロトタイプをテスト] ends 2020-07-25

@enduml

WARNING
 This translation need to be updated. 
WARNING

AND接続詞を使った1行宣言

andでつなぐことで、宣言を1行にできます。

@startuml
Project starts 2020-07-01
[プロトタイプを設計] starts 2020-07-01 and ends 2020-07-15
[プロトタイプをテスト] starts 2020-07-16 and lasts 10 days
@enduml

依存関係

タスク間の依存関係を定義することができます。

@startgantt
[プロトタイプを設計] lasts 15 days
[プロトタイプをテスト] lasts 10 days
[プロトタイプをテスト] starts at [プロトタイプを設計]'s end
@endgantt

@startgantt
[プロトタイプを設計] lasts 10 days
[プロトタイプを実装] lasts 10 days
[テストを実装] lasts 5 days
[プロトタイプを実装] starts at [プロトタイプを設計]'s end
[テストを実装] starts at [プロトタイプを実装]'s start
@endgantt

短い名前

asキーワードを使用して、タスクに短い名前を定義できます。

@startgantt
[プロトタイプを設計] as [D] lasts 15 days
[プロトタイプをテスト] as [T] lasts 10 days
[T] starts at [D]'s end
@endgantt

色のカスタマイズ

is colored in で、のカスタマイズができます。

@startgantt
[プロトタイプを設計] lasts 13 days
[プロトタイプをテスト] lasts 4 days
[プロトタイプをテスト] starts at [プロトタイプを設計]'s end
[プロトタイプを設計] is colored in Fuchsia/FireBrick
[プロトタイプをテスト] is colored in GreenYellow/Green
@endgantt

進捗状況

タスクの進捗状況を示すことができます。

@startgantt
[foo] lasts 21 days
[foo] is 40% completed
[bar] lasts 30 days and is 10% complete
@endgantt

マイルストーン

happens でマイルストーンを定義できます。

依存関係に基づくマイルストーン

@startgantt
[プロトタイプをテスト] lasts 10 days
[プロトタイプが完成] happens at [プロトタイプをテスト]'s end
[製造ラインの準備] lasts 12 days
[製造ラインの準備] starts at [プロトタイプをテスト]'s end
@endgantt

日付指定のマイルストーン

@startgantt
Project starts 2020-07-01
[プロトタイプをテスト] lasts 10 days
[プロトタイプが完成] happens 2020-07-10
[製造ラインの準備] lasts 12 days
[製造ラインの準備] starts at [プロトタイプをテスト]'s end
@endgantt

全タスク完了のマイルストーン

@startgantt
[Task1] lasts 4 days
then [Task1.1] lasts 4 days
[Task1.2] starts at [Task1]'s end and lasts 7 days

[Task2] lasts 5 days
then [Task2.1] lasts 4 days

[最終完了日] happens at [Task1.1]'s end
[最終完了日] happens at [Task1.2]'s end
[最終完了日] happens at [Task2.1]'s end

@endgantt

[Ref. QA-10764]

ハイパーリンク

タスクにハイパーリンクを追加することもできます。

@startgantt
[task1] lasts 10 days
[task1] links to [[http://plantuml.com]]
@endgantt

日付の表示

プロジェクトの開始日時に、特定の日付を指定できます。 デフォルトでは、一番最初のタスクが指定した日付から開始します。

@startgantt
Project starts the 20th of september 2017
[プロトタイプを設計] as [タスク1] lasts 13 days
[タスク1] is colored in Lavender/LightBlue
@endgantt

日付の色

特定の日にを付けることができます。

@startgantt
Project starts the 2020/09/01 

2020/09/07 is colored in salmon
2020/09/13 to 2020/09/16 are colored in lightblue

[プロトタイプを設計] as [TASK1] lasts 22 days
[TASK1] is colored in Lavender/LightBlue
[プロトタイプが完成] happens at [TASK1]'s end
@endgantt

スケールの変更

長期にわたるプロジェクトの場合、次のいずれかのパラメータを使用してスケールを変更することができます。
  • printscale
  • ganttscale
  • projectscale
次のいずれかの値を使用します。
  • daily - 日(デフォルト)
  • weekly - 週
  • monthly - 月
  • quarterly
  • yearly

(See QA-11272, QA-9041 and QA-10948)

daily(デフォルト)

@startuml
saturday are closed
sunday are closed

Project starts the 1st of january 2021
[プロトタイプ設計完了] as [TASK1] lasts 19 days
[TASK1] is colored in Lavender/LightBlue
[テスト] lasts 14 days
[TASK1]->[テスト]

2021-01-18 to 2021-01-22 are named [完了審査会]
2021-01-18 to 2021-01-22 are colored in salmon 
@enduml

weekly

@startuml
printscale weekly
saturday are closed
sunday are closed

Project starts the 1st of january 2021
[プロトタイプ設計完了] as [TASK1] lasts 19 days
[TASK1] is colored in Lavender/LightBlue
[テスト] lasts 14 days
[TASK1]->[テスト]

2021-01-18 to 2021-01-22 are named [完了審査会]
2021-01-18 to 2021-01-22 are colored in salmon 
@enduml

@startgantt
printscale weekly
Project starts the 20th of september 2020
[プロトタイプ設計] as [TASK1] lasts 130 days
[TASK1] is colored in Lavender/LightBlue
[テスト] lasts 20 days
[TASK1]->[テスト]

2021-01-18 to 2021-01-22 are named [完了審査会]
2021-01-18 to 2021-01-22 are colored in salmon 
@endgantt

monthly

@startgantt
projectscale monthly
Project starts the 20th of september 2020
[プロトタイプ設計] as [TASK1] lasts 130 days
[TASK1] is colored in Lavender/LightBlue
[テスト] lasts 20 days
[TASK1]->[テスト]

2021-01-18 to 2021-01-22 are named [完了審査会]
2021-01-18 to 2021-01-22 are colored in salmon 
@endgantt

WARNING
 This translation need to be updated. 
WARNING

Zoom (example for all scale)

You can change zoom, with the parameter:
  • zoom <integer>

Zoom on weekly scale

Without zoom

@startuml
printscale daily
saturday are closed
sunday are closed

Project starts the 1st of january 2021
[Prototype design end] as [TASK1] lasts 8 days
[TASK1] is colored in Lavender/LightBlue
[Testing] lasts 3 days
[TASK1]->[Testing]

2021-01-18 to 2021-01-22 are named [End's committee]
2021-01-18 to 2021-01-22 are colored in salmon 
@enduml

With zoom

@startuml
printscale daily zoom 2
saturday are closed
sunday are closed

Project starts the 1st of january 2021
[Prototype design end] as [TASK1] lasts 8 days
[TASK1] is colored in Lavender/LightBlue
[Testing] lasts 3 days
[TASK1]->[Testing]

2021-01-18 to 2021-01-22 are named [End's committee]
2021-01-18 to 2021-01-22 are colored in salmon 
@enduml

[Ref. QA-13725]

Zoom on weekly scale

Without zoom

@startuml
printscale weekly
saturday are closed
sunday are closed

Project starts the 1st of january 2021
[Prototype design end] as [TASK1] lasts 19 days
[TASK1] is colored in Lavender/LightBlue
[Testing] lasts 14 days
[TASK1]->[Testing]

2021-01-18 to 2021-01-22 are named [End's committee]
2021-01-18 to 2021-01-22 are colored in salmon 
@enduml

With zoom

@startuml
printscale weekly zoom 4
saturday are closed
sunday are closed

Project starts the 1st of january 2021
[Prototype design end] as [TASK1] lasts 19 days
[TASK1] is colored in Lavender/LightBlue
[Testing] lasts 14 days
[TASK1]->[Testing]

2021-01-18 to 2021-01-22 are named [End's committee]
2021-01-18 to 2021-01-22 are colored in salmon 
@enduml

Zoom on monthly scale

Without zoom

@startgantt
projectscale monthly
Project starts the 20th of september 2020
[Prototype design] as [TASK1] lasts 130 days
[TASK1] is colored in Lavender/LightBlue
[Testing] lasts 20 days
[TASK1]->[Testing]

2021-01-18 to 2021-01-22 are named [End's committee]
2021-01-18 to 2021-01-22 are colored in salmon 
@endgantt

With zoom

@startgantt
projectscale monthly zoom 3
Project starts the 20th of september 2020
[Prototype design] as [TASK1] lasts 130 days
[TASK1] is colored in Lavender/LightBlue
[Testing] lasts 20 days
[TASK1]->[Testing]

2021-01-18 to 2021-01-22 are named [End's committee]
2021-01-18 to 2021-01-22 are colored in salmon 
@endgantt

Zoom on quarterly scale

Without zoom

@startgantt
projectscale quarterly
Project starts the 20th of september 2020
[Prototype design] as [TASK1] lasts 130 days
[TASK1] is colored in Lavender/LightBlue
[Testing] lasts 20 days
[TASK1]->[Testing]

2021-01-18 to 2021-01-22 are named [End's committee]
2021-01-18 to 2021-01-22 are colored in salmon 
@endgantt

With zoom

@startgantt
projectscale quarterly zoom 7
Project starts the 20th of september 2020
[Prototype design] as [TASK1] lasts 130 days
[TASK1] is colored in Lavender/LightBlue
[Testing] lasts 20 days
[TASK1]->[Testing]

2021-01-18 to 2021-01-22 are named [End's committee]
2021-01-18 to 2021-01-22 are colored in salmon 
@endgantt

Zoom on yearly scale

Without zoom

@startgantt
projectscale yearly
Project starts the 1st of october 2020
[Prototype design] as [TASK1] lasts 700 days
[TASK1] is colored in Lavender/LightBlue
[Testing] lasts 200 days
[TASK1]->[Testing]

2021-01-18 to 2021-03-22 are colored in salmon 
@endgantt

With zoom

@startgantt
projectscale yearly zoom 2
Project starts the 1st of october 2020
[Prototype design] as [TASK1] lasts 700 days
[TASK1] is colored in Lavender/LightBlue
[Testing] lasts 200 days
[TASK1]->[Testing]

2021-01-18 to 2021-03-22 are colored in salmon 
@endgantt

休業日

特定の曜日・日付を休業日に指定できます。

@startuml
project starts the 2018/04/09
saturday are closed
sunday are closed
2018/05/01 is closed
2018/04/17 to 2018/04/19 is closed
[プロトタイプを設計] lasts 14 days
[プロトタイプをテスト] lasts 4 days
[プロトタイプをテスト] starts at [プロトタイプを設計]'s end
[プロトタイプを設計] is colored in Fuchsia/FireBrick
[プロトタイプをテスト] is colored in GreenYellow/Green
@enduml

さらに、休業期間中の特定の日だけを開業日にすることができます。

@startgantt
2020-07-07 to 2020-07-17 is closed
2020-07-13 is open

Project starts the 2020-07-01
[プロトタイプを設計] lasts 10 days
Then [プロトタイプをテスト] lasts 10 days
@endgantt

Definition of a week depending of closed days

A week is a synonym for how many non-closed days are in a week, as:

@startgantt
Project starts 2021-03-29
[Review 01] happens at 2021-03-29
[Review 02 - 3 weeks] happens on 3 weeks after [Review 01]'s end
[Review 02 - 21 days] happens on 21 days after [Review 01]'s end
@endgantt

So if you specify Saturday and Sunday as closed, a week will be equivalent to 5 days, as:

@startgantt
Project starts 2021-03-29
saturday are closed
sunday are closed
[Review 01] happens at 2021-03-29
[Review 02 - 3 weeks] happens on 3 weeks after [Review 01]'s end
[Review 02 - 21 days] happens on 21 days after [Review 01]'s end
@endgantt

[Ref. QA-13434]

簡単なタスク継承

thenを使えば、連続したタスクを表すことができます。

@startgantt
[プロトタイプを設計] lasts 14 days
then [プロトタイプをテスト] lasts 4 days
then [プロトタイプをデプロイする] lasts 6 days
@enduml

矢印->を使っても表せます。

@startgantt
[プロトタイプを設計] lasts 14 days
[プロトタイプをビルド] lasts 4 days
[テストの準備] lasts 6 days
[プロトタイプを設計] -> [プロトタイプをビルド]
[プロトタイプを設計] -> [テストの準備]
@endgantt

リソースを使用する

onキーワードとリソース名を波括弧に入れて記述することで、リソースを使用するタスクを表すことができます。

@startgantt
[Task1] on {Alice} lasts 10 days
[Task2] on {Bob:50%} lasts 2 days
then [Task3] on {Alice:25%} lasts 1 days
@endgantt

タスクには複数のリソースを割り当てることができます。

@startgantt
[Task1] on {Alice} {Bob} lasts 20 days
@endgantt

リソースを特定の日だけ割り当てないことができます。

@startgantt
project starts on 2020-06-19
[Task1] on {Alice} lasts 10 days
{Alice} is off on 2020-06-24 to 2020-06-26
@endgantt

区切り線

--を使って、タスクを区切ることができます。

@startgantt
[タスク1] lasts 10 days
then [タスク2] lasts 4 days
-- 第2段階 --
then [タスク3] lasts 5 days
then [タスク4] lasts 6 days
@endgantt

複雑な例

1つのタスクに対して、 and で同時に複数の設定を行えます。

依存関係に遅延日数を加えることもできます。

@startgantt
[プロトタイプを設計] lasts 13 days and is colored in Lavender/LightBlue
[プロトタイプをテスト] lasts 9 days and is colored in Coral/Green and starts 3 days after [プロトタイプを設計]'s end
[テストを実装] lasts 5 days and ends at [プロトタイプを設計]'s end
[テストプログラマの雇用] lasts 6 days and ends at [テストを実装]'s start
[テストの実施] is colored in Coral/Green
[テストの実施] starts 1 day before [プロトタイプをテスト]'s start and ends at [プロトタイプをテスト]'s end
@endgantt

コメント

共通コマンドのページに書かれている通り、
Everything that starts with simple quote ' is a comment.

You can also put comments on several lines using /' to start and '/ to end.
(つまり、コメント行は、(空白文字を除くと)シングルクォーテーション'で始まっている必要があります。)

@startgantt
' これはコメントです

[T1] lasts 3 days

/' このコメントは
複数行にわたっています '/

[T2] starts at [T1]'s end and lasts 1 day
@endgantt

スタイルの使用

スタイル無し(デフォルト)

@startuml
[タスク1] lasts 20 days
note bottom
  メモ1 ...
  メモ2 ...
  説明事項1 ...
  説明事項2 ...
end note
[タスク2] lasts 4 days
[タスク1] -> [タスク2]
-- 区切り線のタイトル --
[M1] happens on 5 days after [タスク1]'s end
-- 完了 --
@enduml

スタイル有り

スタイルを指定して、要素の表示を変更することができます。

@startuml
<style>
ganttDiagram {
	task {
		FontName Helvetica
		FontColor red
		FontSize 18
		FontStyle bold
		BackGroundColor GreenYellow
		LineColor blue
	}
	milestone {
		FontColor blue
		FontSize 25
		FontStyle italic
		BackGroundColor yellow
		LineColor red
	}
	note {
		FontColor DarkGreen
		FontSize 10
		LineColor OrangeRed
	}
	arrow {
		FontName Helvetica
		FontColor red
		FontSize 18
		FontStyle bold
		BackGroundColor GreenYellow
		LineColor blue
	}
	separator {
		LineColor red
		BackGroundColor green
		FontSize 16
		FontStyle bold
		FontColor purple
	}
}
</style>
[タスク1] lasts 20 days
note bottom
  メモ1 ...
  メモ2 ...
  説明事項1 ...
  説明事項2 ...
end note
[タスク2] lasts 4 days
[タスク1] -> [タスク2]
-- 区切り線のタイトル --
[M1] happens on 5 days after [タスク1]'s end
-- 完了 --
@enduml

[Ref. QA-10835, QA-12045, QA-11877 and PR-438]

TODO
Awaiting style for Separator and all style for Arrow (thickness...)
DONE
Thanks for style for Separator and all style for Arrow (thickness...)
WARNING
 This translation need to be updated. 
WARNING

ノートの追加

@startgantt
[task01] lasts 15 days
note bottom
  memo1 ...
  memo2 ...
  explanations1 ...
  explanations2 ...
end note

[task01] -> [task02]

@endgantt

期間の重なりがある場合の例。

@startgantt
[task01] lasts 15 days
note bottom
  memo1 ...
  memo2 ...
  explanations1 ...
  explanations2 ...
end note

[task01] -> [task02]
[task03] lasts 5 days

@endgantt

@startgantt

-- test01 --

[task01] lasts 4 days
note bottom
'note left
memo1 ...
memo2 ...
explanations1 ...
explanations2 ...
end note

[task02] lasts 8 days
[task01] -> [task02]
note bottom
'note left
memo1 ...
memo2 ...
explanations1 ...
explanations2 ...
end note
-- test02 --

[task03] as [t3] lasts 7 days
[t3] -> [t4]
@endgantt

DONE
Thanks for correction (of #386 on v1.2020.18) when overlapping

@startgantt

Project starts 2020-09-01

[taskA] starts 2020-09-01 and lasts 3 days
[taskB] starts 2020-09-10 and lasts 3 days
[taskB] displays on same row as [taskA]

[task01] starts 2020-09-05 and lasts 4 days

then [task02] lasts 8 days
note bottom
  note for task02
  more notes
end note

then [task03] lasts 7 days
note bottom
  note for task03
  more notes
end note

-- separator --

[taskC] starts 2020-09-02 and lasts 5 days
[taskD] starts 2020-09-09 and lasts 5 days
[taskD] displays on same row as [taskC]

[task 10] starts 2020-09-05 and lasts 5 days
then [task 11] lasts 5 days
note bottom
  note for task11
  more notes
end note
@endgantt

タスクの中断

@startgantt
Project starts the 5th of december 2018
saturday are closed
sunday are closed
2018/12/29 is opened
[プロトタイプを設計] lasts 17 days
[プロトタイプを設計] pauses on 2018/12/13
[プロトタイプを設計] pauses on 2018/12/14
[プロトタイプを設計] pauses on monday
[プロトタイプをテスト] starts at [プロトタイプを設計]'s end and lasts 2 weeks
@endgantt

リンクの色の変更

@startgantt
[T1] lasts 4 days
[T2] lasts 4 days and starts 3 days after [T1]'s end with blue dotted link
[T3] lasts 4 days and starts 3 days after [T2]'s end with green bold link
[T4] lasts 4 days and starts 3 days after [T3]'s end with green dashed link
@endgantt

@startuml
Links are colored in blue
[プロトタイプを設計] lasts 14 days
[プロトタイプを実装] lasts 4 days
[テストを実装] lasts 6 days
[プロトタイプを設計] -[#FF00FF]-> [プロトタイプを実装]
[プロトタイプを設計] -[dotted]-> [テストを実装]
@enduml

[Ref. QA-13693]

WARNING
 This translation need to be updated. 
WARNING

タスクやマイルストーンを同じ行に表示する

@startgantt
[プロトタイプを設計] lasts 13 days
[プロトタイプをテスト] lasts 4 days and 1 week
[プロトタイプをテスト] starts 1 week and 2 days after [プロトタイプを設計]'s end
[プロトタイプをテスト] displays on same row as [プロトタイプを設計]
[r1] happens on 5 days after [プロトタイプを設計]'s end
[r2] happens on 5 days after [r1]'s end
[r3] happens on 5 days after [r2]'s end
[r2] displays on same row as [r1]
[r3] displays on same row as [r1]
@endgantt

WARNING
 This translation need to be updated. 
WARNING

今日に色を付ける

@startgantt
Project starts the 20th of september 2018
sunday are close
2018/09/21 to 2018/09/23 are colored in salmon
2018/09/21 to 2018/09/30 are named [Vacation in the Bahamas] 

today is 30 days after start and is colored in #AAF
[Foo] happens 40 days after start
[Dummy] lasts 10 days and starts 10 days after start

@endgantt

2つのマイルストーンに挟まれたタスク

@startgantt
project starts on 2020-07-01
[開始] happens 2020-07-03
[終了] happens 2020-07-13
[プロトタイプを設計] occurs from [開始] to [終了]
@endgantt

Grammar and verbal form

Verbal form Example
[T] starts
[M] happens

ガントチャートにタイトル、ヘッダ、フッタ、キャプション、凡例を追加する

@startuml

header これはヘッダです

footer これはフッタです

title これはタイトルです

[プロトタイプ設計] lasts 13 days

legend
これは凡例です
end legend

caption これはキャプションです

@enduml

(参考: 共通コマンド)

下部のボックスの除去

hide footboxキーワードを使用して、ガントチャート下部のボックスを取り除くことができます。(シーケンス図と同様)

例:

  • 日単位(プロジェクト開始日の指定無し)

@startgantt

hide footbox
title Foot Box removed

[プロトタイプ設計] lasts 15 days
[プロトタイプをテスト] lasts 10 days
@endgantt

  • 日単位

@startgantt

Project starts the 20th of september 2017
[プロトタイプ設計] as [TASK1] lasts 13 days
[TASK1] is colored in Lavender/LightBlue

hide footbox
@endgantt

  • 週単位

@startgantt
hide footbox

printscale weekly
saturday are closed
sunday are closed

Project starts the 1st of january 2021
[プロトタイプ設計完了] as [TASK1] lasts 19 days
[TASK1] is colored in Lavender/LightBlue
[テスト] lasts 14 days
[TASK1]->[テスト]

2021-01-18 to 2021-01-22 are named [完了審査会]
2021-01-18 to 2021-01-22 are colored in salmon 
@endgantt

  • 月単位

@startgantt

hide footbox

projectscale monthly
Project starts the 20th of september 2020
[プロトタイプ設計] as [TASK1] lasts 130 days
[TASK1] is colored in Lavender/LightBlue
[テスト] lasts 20 days
[TASK1]->[テスト]

2021-01-18 to 2021-01-22 are named [完了審査会]
2021-01-18 to 2021-01-22 are colored in salmon 
@endgantt

WARNING
 This translation need to be updated. 
WARNING