Multilingual Wiki Documentation

You are currently using syntax.
In an attempt to improve PlantUML documentation...
Please do not use this website for your own diagrams.
You can click here and use the online server here for your own documentation.

Recent changes    Wiki Toc    View page history    Add new chapter    Reorder page    Raw

Gantt Diagram

This is only a proposal and subject to change.

You are very welcome to create a new discussion on this future syntax. Your feedbacks, ideas and suggestions help us to find the right solution.

The Gantt is described in natural language, using very simple sentences (subject-verb-complement).

Declaring tasks

Tasks defined using square bracket.

Duration

Their durations are defined using the last verb:

@startgantt
[Prototype design] lasts 15 days
[Test prototype] lasts 10 days
@endgantt

Start

Their beginning are defined using the start verb:

@startuml
[Design du prototype] lasts 15 days
[Test du prototype] lasts 10 days

Project starts 2020-07-01
[Design du prototype] starts 2020-07-01
[Test du prototype] starts 2020-07-16
@enduml

End

Their ending are defined using the end verb:

@startuml
[Design du prototype] lasts 15 days
[Test du prototype] lasts 10 days

Project starts 2020-07-01
[Design du prototype] ends 2020-07-15
[Test du prototype] ends 2020-07-25

@enduml

Start/End

It is possible to define both absolutely, by specifying dates:

@startuml

Project starts 2020-07-01
[Design du prototype] starts 2020-07-01
[Test du prototype] starts 2020-07-16
[Design du prototype] ends 2020-07-15
[Test du prototype] ends 2020-07-25

@enduml

One-line declaration (with the and conjunction)

It is possible to combine declaration on one line with the and conjunction.

@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

Adding constraints

It is possible to add constraints between tasks.

@startgantt
[Prototype design] lasts 15 days
[Test prototype] lasts 10 days
[Test prototype] starts at [Prototype design]'s end
@endgantt

@startgantt
[Prototype design] lasts 10 days
[Code prototype] lasts 10 days
[Write tests] lasts 5 days
[Code prototype] starts at [Prototype design]'s end
[Write tests] starts at [Code prototype]'s start
@endgantt

Short names

It is possible to define short name for tasks with the as keyword.

@startgantt
[Prototype design] as [D] lasts 15 days
[Test prototype] as [T] lasts 10 days
[T] starts at [D]'s end
@endgantt

Customize colors

It is also possible to customize colors with is colored in.

@startgantt
[Prototype design] lasts 13 days
[Test prototype] lasts 4 days
[Test prototype] starts at [Prototype design]'s end
[Prototype design] is colored in Fuchsia/FireBrick
[Test prototype] is colored in GreenYellow/Green
@endgantt

Completion status

You can set the completion status of a task.

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

Milestone

You can define Milestones using the happen verb.

Relative milestone (use of constraints)

@startgantt
[Test prototype] lasts 10 days
[Prototype completed] happens at [Test prototype]'s end
[Setup assembly line] lasts 12 days
[Setup assembly line] starts at [Test prototype]'s end
@endgantt

Absolute milestone (use of fixed date)

@startgantt
Project starts 2020-07-01
[Test prototype] lasts 10 days
[Prototype completed] happens 2020-07-10
[Setup assembly line] lasts 12 days
[Setup assembly line] starts at [Test prototype]'s end
@endgantt

Milestone of maximum end of tasks

@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

[MaxTaskEnd] happens at [Task1.1]'s end
[MaxTaskEnd] happens at [Task1.2]'s end
[MaxTaskEnd] happens at [Task2.1]'s end

@endgantt

[Ref. QA-10764]

Hyperlinks

You can add hyperlinks to tasks.

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

Calendar

You can specify a starting date for the whole project. By default, the first task starts at this date.

@startgantt
Project starts the 20th of september 2017
[Prototype design] as [TASK1] lasts 13 days
[TASK1] is colored in Lavender/LightBlue
@endgantt

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:
  • printscale
  • ganttscale
  • projectscale
and one of the values:
  • weekly
  • monthly

(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

Close day

It is possible to close some day.

@startgantt
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
[Prototype design] lasts 14 days
[Test prototype] lasts 4 days
[Test prototype] starts at [Prototype design]'s end
[Prototype design] is colored in Fuchsia/FireBrick
[Test prototype] is colored in GreenYellow/Green
@endgantt

Then it is possible to open some closed day.

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

Project starts the 2020-07-01
[Prototype design] lasts 10 days
Then [Test prototype] lasts 10 days
@endgantt

Simplified task succession

It's possible to use the then keyword to denote consecutive tasks.

@startgantt
[Prototype design] lasts 14 days
then [Test prototype] lasts 4 days
then [Deploy prototype] lasts 6 days
@endgantt

You can also use arrow ->

@startgantt
[Prototype design] lasts 14 days
[Build prototype] lasts 4 days
[Prepare test] lasts 6 days
[Prototype design] -> [Build prototype]
[Prototype design] -> [Prepare test]
@endgantt

Separator

You can use -- to separate sets of tasks.

@startgantt
[Task1] lasts 10 days
then [Task2] lasts 4 days
-- Phase Two --
then [Task3] lasts 5 days
then [Task4] lasts 6 days
@endgantt

Working with resources

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

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

Multiple resources can be assigned to a task:

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

Resources can be marked as off on specific days:

@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

Complex example

It also possible to use the and conjunction.

You can also add delays in constraints.

@startgantt
[Prototype design] lasts 13 days and is colored in Lavender/LightBlue
[Test prototype] lasts 9 days and is colored in Coral/Green and starts 3 days after [Prototype design]'s end
[Write tests] lasts 5 days and ends at [Prototype design]'s end
[Hire tests writers] lasts 6 days and ends at [Write tests]'s start
[Init and write tests report] is colored in Coral/Green
[Init and write tests report] starts 1 day before [Test prototype]'s start and ends at [Test prototype]'s end
@endgantt

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


Please report any bugs to plantuml@gmail.com or here.
This website is still in beta testing.