Donate241Patreon125


ガントチャート

ガントチャートは、「主語と動詞の組み合わせ」という、単純で自然な英語を書くように記述できます。

タスクの定義

タスクは角カッコで定義します。期間は last で指定します。

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

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

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

@startuml
Project starts 2020-07-01
[Design du prototype] starts 2020-07-01 and ends 2020-07-15
[Test du prototype] starts 2020-07-16 and lasts 10 days
@enduml

依存関係

startend で、タスク間の依存関係を定義します。

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

複数のタスク同士をつなぐこともできます。

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

エイリアス

as で、タスクに短い名前(エイリアス)を定義できます。

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

色の変更

colored in で、色の変更ができます。 色の指定には、HTMLのカラーネームを使用します。

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

Completion status

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

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

マイルストーン

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

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

ハイパーリンク

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

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

日付の表示

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

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

Coloring days

It is possible to add colors to some days.

@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

[Prototype design] as [TASK1] lasts 22 days
[TASK1] is colored in Lavender/LightBlue
[Prototype completed] happens at [TASK1]'s end
@endgantt

Changing scale

You can change scale for very long project, with one of those parameters: and one of the values:

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

@startgantt
printscale weekly
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]
@endgantt

@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]
@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

簡単なタスク継承

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

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

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

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

区切り線

--を使えば、グループタスクを一緒に表示できます。

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

Working with resources

You can affect tasks on resources using the on keyword and brackets for resource name.

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

複雑な例

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

依存する前提タスクを、後から追加することができます。

@startuml
[プロトタイプを設計] 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
@enduml

Comments

As is mentioned on Common Commands page:
Everything that starts with simple quote ' is a comment.

You can also put comments on several lines using /' to start and '/ to end.
(i.e.: the first character (except space character) of a comment line must be a simple quote ')

@startgantt
' This is a comment

[T1] lasts 3 days

/' this comment
is on several lines '/

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

Using style

@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
	}
}
</style>
[Task1] lasts 20 days
note bottom
  memo1 ...
  memo2 ...
  explanations1 ...
  explanations2 ...
end note
[Task2] lasts 4 days
[Task1] -> [Task2]
-- Separator title --
[M1] happens on 5 days after [Task1]'s end
-- end --
@enduml

Add notes

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

[task01] -> [task02]

@endgantt

Example with overlap.

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

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

@endgantt

FIXME
Waiting for correction when overlapping
FIXME

@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 --

[<back:red>task03] as [t3] lasts 7 days
[t3] -> [<back:red>t4]
@endgantt

Pause tasks

@startgantt
Project starts the 5th of december 2018
saturday are closed
sunday are closed
2018/12/29 is opened
[Prototype design] lasts 17 days
[Prototype design] pauses on 2018/12/13
[Prototype design] pauses on 2018/12/14
[Prototype design] pauses on monday
[Test prototype] starts at [Prototype design]'s end and lasts 2 weeks
@endgantt

Change link colors

@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
[Prototype design] lasts 14 days
[Build prototype] lasts 4 days
[Prepare test] lasts 6 days
[Prototype design] -[#FF00FF]-> [Build prototype]
[Prototype design] -[dotted]-> [Prepare test]
@enduml

Tasks or Milestones on the same line

@startgantt
[Prototype design] lasts 13 days
[Test prototype] lasts 4 days and 1 week
[Test prototype] starts 1 week and 2 days after [Prototype design]'s end
[Test prototype] displays on same row as [Prototype design]
[r1] happens on 5 days after [Prototype design]'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

Highlight today

@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

Task between two milestones

@startgantt
project starts on 2020-07-01
[P_start] happens 2020-07-03
[P_end]   happens 2020-07-13
[Prototype design] occurs from [P_start] to [P_end]
@endgantt

Grammar and verbal form

Verbal form Example
[T] starts
[M] happens

Add title, (header, footer), caption or legend on gantt diagram

@startuml

'header some header

'footer some footer

title My title

[Prototype design] lasts 13 days

legend
The legend
end legend

caption This is caption

@enduml

(See also: Common commands)