Overview
Gantt chart diagrams in Sirena visualize project schedules, showing tasks over time with dependencies, sections, and status indicators. Gantt charts are essential for project management and timeline visualization.
Gantt charts are useful for:
-
Project planning and scheduling
-
Task dependency visualization
-
Timeline management
-
Resource allocation tracking
-
Progress monitoring
-
Milestone tracking
Syntax specification
Diagram declaration
Gantt charts are declared using the gantt keyword:
gantt
<configuration>
<sections-and-tasks>
Configuration directives
Date format
Specifies the date format for task dates:
gantt
dateFormat YYYY-MM-DD
Common date formats:
-
YYYY-MM-DD- ISO date format (2024-01-15) -
YYYY-MM-DD HH:mm- Date with time -
DD/MM/YYYY- European format -
MM/DD/YYYY- US format
Axis format
Specifies how dates are displayed on the timeline axis:
gantt
axisFormat %m-%d
Format specifiers:
-
%Y- Full year (2024) -
%m- Month (01-12) -
%d- Day (01-31) -
%H- Hour (00-23) -
%M- Minute (00-59)
Tick interval
Sets the interval between timeline ticks:
gantt
tickInterval 1day
tickInterval 1week
tickInterval 1month
Section declarations
Sections group related tasks:
gantt
section Planning
Task 1 :2024-01-01, 30d
Task 2 :2024-01-15, 20d
section Development
Task 3 :2024-02-01, 45d
Task definitions
Tasks can be defined in multiple formats:
Basic task with dates and duration
Task description :task_id, start_date, duration
Example:
Design phase :des1, 2024-01-01, 30d
Task with start and end dates
Task description :task_id, start_date, end_date
Example:
Implementation :impl, 2024-01-15, 2024-02-15
Task with dependencies
Task description :task_id, after other_task_id, duration
Example:
Testing :test, after impl, 15d
Task with status tags
Tasks can have status tags that affect their appearance:
-
done- Completed task (green) -
active- Currently active task (blue) -
crit- Critical task (red) -
milestone- Milestone marker (diamond shape)
Completed task :done, task1, 2024-01-01, 10d
Active task :active, task2, 2024-01-11, 5d
Critical task :crit, task3, 2024-01-16, 3d
Project milestone :milestone, m1, 2024-01-20, 0d
Task dependencies
Tasks can depend on other tasks using the after keyword:
gantt
section Tasks
Task A :a, 2024-01-01, 10d
Task B :b, after a, 5d
Task C :c, after b, 3d
Tasks can also use until to end when another task starts:
gantt
section Tasks
Task A :a, 2024-01-01, 10d
Task B :b, 2024-01-05, until a
Examples
Basic Gantt chart
gantt
title Simple Project Timeline
dateFormat YYYY-MM-DD
section Planning
Requirements :a1, 2024-01-01, 30d
Design :a2, after a1, 20d
section Development
Implementation :b1, after a2, 45d
Testing :b2, after b1, 15d
This creates a basic Gantt chart with two sections and sequential tasks.
Gantt chart with task statuses
gantt
title Project Progress
dateFormat YYYY-MM-DD
section Completed
Analysis :done, a1, 2024-01-01, 10d
Design :done, a2, 2024-01-11, 15d
section In Progress
Development :active, b1, 2024-01-26, 30d
section Pending
Testing :crit, b2, after b1, 10d
Deployment :milestone, m1, after b2, 0d
This example shows:
-
Completed tasks marked with
donetag (green) -
Active task marked with
activetag (blue) -
Critical task marked with
crittag (red) -
Milestone marker with zero duration
Complex Gantt chart with dependencies
gantt
title Software Development Project
dateFormat YYYY-MM-DD
axisFormat %m-%d
section Planning
Requirements gathering :done, req, 2024-01-01, 15d
System design :done, des, after req, 20d
section Development
Backend development :active, be, after des, 30d
Frontend development :active, fe, after des, 35d
Integration :int, after be, after fe, 10d
section Testing
Unit testing :crit, ut, after be, 5d
Integration testing :crit, it, after int, 7d
UAT :uat, after it, 10d
section Deployment
Staging deployment :sd, after uat, 2d
Production deployment :milestone, pd, after sd, 0d
This demonstrates:
-
Multiple sections organizing the project
-
Task dependencies using
afterkeyword -
Mixed task statuses (done, active, crit)
-
Milestone marker for deployment
-
Custom axis format for date display
Gantt chart with excludes
gantt
title Development Sprint
dateFormat YYYY-MM-DD
excludes weekends
section Week 1
Sprint planning :done, 2024-01-08, 1d
Feature A :active, 2024-01-09, 4d
section Week 2
Feature B :2024-01-15, 5d
Code review :2024-01-22, 2d
This shows how to exclude weekends from the timeline calculation.
Features
Task identification
Tasks can have IDs for referencing in dependencies:
gantt
section Tasks
First task :task1, 2024-01-01, 10d
Second task :task2, after task1, 5d
Third task :after task2, 3d
Multiple task tags
Tasks can have multiple status tags:
gantt
section Critical Path
Important task :crit, active, t1, 2024-01-01, 10d
Completed critical :crit, done, t2, 2024-01-11, 5d
Limitations
Best practices
Use meaningful task names
Use clear, descriptive names for tasks:
gantt
%% Good
Requirements analysis :done, 2024-01-01, 10d
%% Less clear
Task 1 :done, 2024-01-01, 10d
Organize with sections
Group related tasks into logical sections:
gantt
section Planning
<planning tasks>
section Development
<development tasks>
section Testing
<testing tasks>
Use status tags appropriately
Apply status tags to provide visual context:
-
donefor completed work -
activefor current work -
critfor critical path items -
milestonefor key dates
Set appropriate date formats
Choose date formats that match your audience:
gantt
%% For international audience
dateFormat YYYY-MM-DD
axisFormat %Y-%m-%d
%% For US audience
dateFormat MM/DD/YYYY
axisFormat %m/%d