Gantt Chart
Source: Data Visualisation Catalogue - Gantt Chart
Why This Belongs In The Compiler Gallery
The catalogue describes Gantt charts as timelines of tasks or activities with start and end positions. This chart now exercises the compiler's temporal interval path: raw date fields compile into normalized intervals, then a time scale and generated date axis render the shared schedule.
Data Contract
Each raw row represents one task or activity interval.
| Field | Type | Purpose |
|---|---|---|
task | categorical | Task label shown on the categorical axis. |
phase | categorical, optional | Higher-level grouping or lane. |
startDate | temporal | Raw start date. |
endDate | temporal | Raw end date. |
status | categorical, optional | Color grouping. |
start | temporal, derived | Normalized interval start date. |
end | temporal, derived | Normalized interval end date. |
duration | quantitative, derived | Interval length in days. |
Expected Visual
The faithful catalogue version should show horizontal bars positioned on a shared timeline. Bar length encodes duration, vertical position identifies the task, and color may encode status or phase.
| Element | Expected treatment |
|---|---|
| Task bars | Rects using start and end bounds on a shared x scale. |
| Task labels | Band-axis labels keyed by task. |
| Timeline | Continuous or temporal x axis with gridlines. |
| Milestones | Optional guide lines or markers on the same x scale. |
| Color | Optional categorical encoding for phase or status. |
Compiler Mapping
| Compiler part | Mapping |
|---|---|
| Data source | tasks raw table and derived intervals table. |
| Transform | interval to compute start, end, duration, center, tooltip, and duration label. |
| Scales | x: time, y: band, color: ordinal. |
| Layers | rect interval bars, line milestone/grid guides, text duration labels. |
| Interaction | Hover should expose task, start, end, duration, status, and source row. |
Faithfulness Notes
The current gallery implementation now uses real date fields and generated date ticks. Remaining Gantt-specific work is dependency links, milestone symbols, richer working-day/session calendars, and collision-aware labels.