Gantt Chart

A Gantt Chart, is a powerful tool used for project management. It visually represents a project schedule, allowing managers and team members to see the start and end dates of the entire project at a glance. The diagram displays tasks or activities along a horizontal time axis, showing the duration of each task, their sequence, and how they overlap or run concurrently.

In a Gantt Chart, each task is represented by a bar, the length and position of which reflects the start date, duration, and end date of the task. This format makes it easy to understand dependencies between tasks, where one task must be completed before another can start. Additionally, Gantt Diagrams can include milestones, which are significant events or goals in the project timeline, marked as a distinct symbol.

In the context of creating Gantt Charts, PlantUML offers several advantages. It provides a text-based approach to diagram creation, making it easy to track changes using version control systems. This approach is particularly beneficial for teams who are already accustomed to text-based coding environments. PlantUML's syntax for Gantt Charts is straightforward, enabling quick modifications and updates to the project timeline. Additionally, the integration of PlantUML with other tools and its ability to generate diagrams dynamically from text makes it a versatile choice for teams looking to automate and streamline their project management documentation. The use of PlantUML for Gantt Charts thus combines the clarity and efficiency of visual project planning with the flexibility and control of a text-based system.

Declaring tasks

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

Tasks defined using square bracket.

Workload

The workload for each task is specified using the requires verb, indicating the amount of work needed in terms of days.

A week is typically understood as a span of seven days. However, in contexts where certain days are designated as 'closed' (like weekends), a week can be redefined in terms of 'non-closed' days. For example, if Saturday and Sunday are marked as closed, then a week in this context will equate to a five-day workload, corresponding to the remaining weekdays.

Start

Their beginning are defined using the start verb:

[Ref. for D+nn form: QA-14494]

End

Their ending are defined using the end verb:

Start/End

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

One-line declaration (with the and conjunction)

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

Adding constraints

It is possible to add constraints between tasks.

Short names or alias

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

Tasks with same name

[Starting with V1.2024.6,] it is possible to have multiple tasks with same name.

[Ref. QA-12176 and GH-1809]

Customize colors

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

Completion status

Adding completion depending percentage

You can set the completion status of a task, by the command:

Change colour of completion (by style)

[Ref. QA-8297]

Change colour of undone part of Task (by style)

[Ref. QA-15299]

Milestone

You can define Milestones using the happen verb.

Relative milestone (use of constraints)

Absolute milestone (use of fixed date)

Milestone of maximum end of tasks

[Ref. QA-10764]

Hyperlinks

You can add hyperlinks to tasks.

Calendar

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

Coloring days

It is possible to add colors to some days.

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)

Daily (by default)

Weekly

Monthly

Quarterly

Yearly

Date range with between

Without date range

With date range

Zoom (example for all scale)

You can change zoom, with the parameter:

Zoom on daily (default) scale

[Ref. QA-13725]

Zoom on weekly scale

Zoom on monthly scale

Zoom on quarterly scale

Zoom on yearly scale

Weekscale with Weeknumbers or Calendar Date

With Weeknumbers (by default)

With Weeknumbers (starting from 1)

[Ref. GH-525]

With specific Weeknumbers (starting from n [including negative integer])

[Ref. GH-2202]

With Calendar Date

[Ref. QA-11630]

Change first day of week

[Ref. QA-11630]

Close day

It is possible to close some day.

Then it is possible to open some closed day.

Definition of a week depending of closed days

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

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

[Ref. QA-13434]

Working days

It is possible to manage working days.

[Ref. QA-16188]

Simplified task succession

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

You can also use arrow ->

Working with resources

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

Multiple resources can be assigned to a task:

Resources can be marked as off on specific days:

Hide resources

Without any hiding (by default)

Hide resources names

You can hide resources names and percentage, on tasks, using the hide resources names keywords.

Hide resources footbox

You can also hide resources names on bottom of the diagram using the hide resources footbox keywords.

Hide the both (resources names and resources footbox)

You can also hide the both.

Horizontal Separator

You can use -- to separate sets of tasks.

Vertical Separator

You can add Vertical Separators with the syntax: Separator just [at].

[Ref. QA-16247]

Complex example

It also possible to use the and conjunction.

You can also add delays in constraints.

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 ')

Using style

Without style (by default)

With style

You can use style to change rendering of elements.

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

With style (full example)

[Ref. QA-13570, QA-13672]

DONE
Thanks for style for Separator and all style for Arrow (thickness...)

Clean style

With style, you can also clean a Gantt diagram (showing tasks, dependencies and relative durations only - but no actual start date and no actual scale):
[Ref. QA-13971]

Or:

[Ref. QA-13464]

Add notes

Example with overlap.

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

Pause tasks

Change link colors

You can change link colors:

[Ref. QA-13693]

Tasks or Milestones on the same line

You can put Tasks or Milestones on the same line, with this syntax:

Highlight today

Task between two milestones

Grammar and verbal form

Verbal form Example
[T] starts
[M] happens

Add title, header, footer, caption or legend

(See also: Common commands)

Add color on legend

[Ref. QA-19021]

Removing Foot Boxes (example for all scale)

You can use the hide footbox keywords to remove the foot boxes of the gantt diagram (as for sequence diagram).

Examples on:

Language of the calendar

You can choose the language of the Gantt calendar, with the language <xx> command where <xx> is the ISO 639 code of the language.

English (en, by default)

Deutsch (de)

Japanese (ja)

Chinese (zh)

Korean (ko)

Delete Tasks or Milestones

You can mark some Tasks or Milestones as deleted instead of normally completed to distinguish tasks that may possibly have been discarded, postponed or whatever.

[Ref. QA-9129]

Start a project, a task or a milestone a number of days before or after today

You can start a project, a task or a milestone a number of days before or after today, using the builtin functions %now and %date:

[Ref. QA-16285]

Change Label position

The labels are near elements (by default)

To change the label position, you can use the command label:

Label on first column

Label on last column

[Ref. QA-12433]

Definition of a month (30 days)

A month is a synonym for 30 days.

[Ref. QA-14494]