Gantt chart reference

Gantt examples

Contents: Use cases, Chart IDs, Minimal spec, Data, Options, Annotations, Sizing, Fixtures, Not for.

Project timeline: adaptive calendar, activity spans, cadence rows, events, and elapsed-time context. Type gantt. Aliases: timeline.

Use cases

Chart IDs

One form; its chart ID is gantt.

Minimal spec

{
  "type": "gantt",
  "data": {
    "rows": [
      {
        "id": "design",
        "label": "Design",
        "items": [{ "id": "design-bar", "kind": "bar", "start": "2026-04-01", "end": "2026-04-10" }]
      },
      {
        "id": "launch",
        "label": "Launch",
        "items": [{ "id": "launch-date", "kind": "milestone", "start": "2026-04-15" }]
      }
    ]
  },
  "options": { "title": "Design ends five days before launch", "source": "Illustrative data" }
}

Data

PathTypeRequiredMeaning
rowsarrayyesTask and cadence rows displayed in the supplied order.
rows[].id (rows[] branch 1 | rows[] branch 2)stringyesUnique timeline row identity.
rows[].label (rows[] branch 1 | rows[] branch 2)stringyesVisible timeline row name.
rows[].sublabel (rows[] branch 1 | rows[] branch 2)stringSecond line under the row name, such as what the row measures. Printed in the label font and muted ink, on one line and never cut; the name band takes the wider of name and sublabel. On narrow canvases it follows the name on the row's name line. labels.activity: false hides it with the name.
rows[].indent (rows[] branch 1 | rows[] branch 2)integerNonnegative indentation level for the row label.
rows[].cols (rows[] branch 1 | rows[] branch 2)arrayMetadata columns beside the row label, such as owner and status; up to three are displayed. A cell is text, or text with a tone.
rows[].cols[].text (rows[] branch 1 | rows[] branch 2)stringyesCell text, such as a status word.
rows[].cols[].tone (rows[] branch 1 | rows[] branch 2)stringStatus tone; omitted, the cell is plain text. A tone is drawn as a small filled marker in the tone's color before the text. The row's bars and chevrons without a colorRole take the same color, as do those of rows indented under it without a status, so the status column keys them. One of 'good', 'warn', 'bad', 'neutral'.
rows[].kind (rows[] branch 1)stringTask row containing individual timeline items; task is the default row kind. One of 'task'.
rows[].items (rows[] branch 1)arrayyesTimeline items placed in this task row.
rows[].items[].id (rows[] branch 1)stringyesUnique item identity used by annotations and scene elements.
rows[].items[].kind (rows[] branch 1)stringyesTimeline mark. Milestone labels try their row bands before the lane; unsafe leaders use a numbered key. 'rule' is a quiet span for the state before a change: a 2 px neutral line at the bottom of the bar box with its label above it in muted ink, flush left; it never takes a color or a color-key entry. One of 'bar', 'milestone', 'chevron', 'bracket', 'shade', 'rule'.
rows[].items[].start (rows[] branch 1)stringyesISO 8601 start date; an anchor can move it while preserving duration.
rows[].items[].end (rows[] branch 1)stringInclusive ISO 8601 end date for an interval; omission uses the start date.
rows[].items[].label (rows[] branch 1)stringDisplayed item name. An omitted name leaves category content empty.
rows[].items[].colorRole (rows[] branch 1)stringTheme color role for this timeline mark. One of good, bad, warn, neutral, neutralLight, highlight, total, others; series-N for step N of the theme ramp, 1-based (series-2 is color.series[1]); or status-<key> for a theme status color. A hex color goes in fill.
rows[].items[].colorLabel (rows[] branch 1)stringWhat this bar's or chevron's color means. When bars differ in color, the color key names each color by the first label its items declare. legend.order lists item ids; an entry takes the place of the first of its items listed.
rows[].items[].scope (rows[] branch 1)stringMilestone scope: 'row' (default) keeps the milestone in its activity row; 'shared' moves it to one shared milestone row below the activities, labeled beside its diamond, for dates that affect several activities such as steering committees. One of 'row', 'shared'.
rows[].items[].anchor (rows[] branch 1)objectResolve the start relative to another item edge while preserving the authored duration.
rows[].items[].anchor.toItemId (rows[] branch 1)stringyesTarget item id whose start or end anchors this item.
rows[].items[].anchor.edge (rows[] branch 1)stringyesTarget edge used to resolve the anchored start date. One of 'start', 'end'.
rows[].items[].anchor.offsetDays (rows[] branch 1)integerSigned number of days added to the target edge; defaults to zero.
rows[].kind (rows[] branch 2)stringyesCadence row showing repeated dated event markers. One of 'cadence'.
rows[].events (rows[] branch 2)arrayyesDated events placed along this cadence row.
rows[].events[].id (rows[] branch 2)stringyesUnique event identity shared with the timeline mark id namespace.
rows[].events[].date (rows[] branch 2)stringyesISO 8601 date of the cadence event.
rows[].marker (rows[] branch 2)stringCadence event shape; defaults to diamond. One of 'diamond', 'triangle'.
rows[].colorRole (rows[] branch 2)stringTheme color role shared by the cadence markers. One of good, bad, warn, neutral, neutralLight, highlight, total, others; series-N for step N of the theme ramp, 1-based (series-2 is color.series[1]); or status-<key> for a theme status color. A hex color goes in fill.

Options

PathTypeValuesDefaultMeaning
labelsfalse | objectfalse (or another value of its type)False hides timeline item labels. Row names, metadata cells and column headers remain. Use labels.activity: false to hide those, or labels.item: false to hide only item labels. For milestones, labels.item: ['category'] prints the item name without its date; ['absolute'] or the legacy ['value'] prints only the date. Span items print the inclusive date range. Parts follow the supplied order. An empty requested part is named in a note.
todaystringAuthored ISO 8601 date for the dashed today marker; the system clock is not read. The marker, like an event rule, passes the period names of the calendar head with a gap. A bar, arrow or shade name with no seat clear of the marker and the event rules sits inside its mark across them, and the rules break over that mark.
elapsedbooleanTint the visible time before today; defaults to true when the today marker is displayed.
weekendsbooleanShade Saturday and Sunday at week granularity; defaults to false.
rowTintbooleanApply alternating faint row backgrounds; defaults to false.
calendarobjectCalendar head and span. The defaults keep the ISO week head over whole periods.
calendar.weeksstring'isoWeek', 'startDay'Week cell names. 'isoWeek' (default): ISO week numbers such as 'W11'. 'startDay': the day of the month each week cell starts on ('9'), flush left in its cell under the month tier, so the number reads as the day the week starts; a clipped first or last cell names the day it starts on. Week granularity only; elsewhere it is ignored with the info lint calendar-weeks-ignored.
calendar.spanstring'periods', 'data'Timeline span. 'periods' (default): whole calendar periods of the head's finer tier. 'data': from the first item or cadence day to the later of the last item end and options.today, so the arrows end at the edge. A milestone or cadence marker on the first or last day keeps room for its radius inside the edge. Event annotations and a today before the first item do not extend the span; they are left out with event-out-of-range or today-out-of-range.
colHeadersarrayPositional headers for up to three existing metadata columns. Omitted or empty entries have no header; entries without a displayed column are ignored. A columnOverrides label beats the entry of its column.
columnOverridesobjectSettings per generated column. Ids: name, meta0, meta1, meta2.
columnOverrides.*.widthnumberTrack width in px. It beats the width the type would pick.
columnOverrides.*.alignstring'left', 'right', 'center'Alignment of the column: its cell text and, unless headAlign is set, its head. Bars keep starting at the panel origin.
columnOverrides.*.headAlignstring'left', 'right', 'center'Head alignment; defaults to align.
columnOverrides.*.labelstringHead text.
columnOrderarrayOrder of whole blocks; blocks left out follow in default order. Ids: meta, plot.

Plus the shared options. This type does not accept format, detailFields, labelPosition, valueAxis, hatchStrength, rounding. This type ignores animate, debug, rowLabels, categoryAxis, categoryLabels, secondaryAxis, sort, topN, valueAxis.show, valueAxis.gridlines with an option-ignored warning.

Annotations

An annotation anchor is a category or item id string, or an object with categoryId plus optional seriesId, segmentId and edge (start, end, total); pointId addresses a scatter point. Category anchors, including from/to, take category ids, not category labels.

KindPurposeRequiredAnchorsOptional fieldsNotes
eventPlaces a dated event in the lane above the plot as a block with a pole to the data, or, when it does not fit, as a numbered marker with an entry in the event key below the plot; periods draw a thin bar.at, labelat: AnchorReftone: neutral | bad | good, default the group tone, else neutral. Column, combo and line paint the glyph, the marker ring and the period bar in it; gantt paints a bad rule. labelPlacement: top | inline | badge, default top. inline (line) sets the block beside its rule inside the plot. badge (gantt) draws the label, at most 3 characters, in a filled circle at the top of its rule; badge events never go to the numbered key.An ISO date or a schedule item id positions the rule. Above three events the labels move to numbered footnotes.

Sizing

Floor 280 × 28 px; fit content.

Below the floor a render is refused with size-below-floor and the pixels it needs. measure returns the natural and comfortable size for a given spec; see Sizing in the manual.

Fixtures

IDKindUse case
status-ganttexampleStatus Gantt (hierarchy, elapsed era, events, and cadence swimlanes)
transformation-programexample12-month transformation program (owner and status columns, bars in their status color, shared milestones, cadence band, today line)
product-launchexampleProduct launch plan (anchored items, week scale, weekends)
single-daytortureTorture: single-day span pads to a whole week
two-year-spantortureTorture: 26-month span uses years + quarters headers
dense-14-rowstortureTorture: 14 rows at month scale stay overlap-free
anchored-chaintortureTorture: anchor chain declared in reverse order
milestone-clustertortureTorture: same-day milestone cluster spreads its labels
right-edge-milestone-rowtortureRegression: last row with only a right-edge milestone keeps its activity label centered
workstream-status-planexampleWorkstream status plan (weekly view, owners, due dates, and semantic status)
metadata-column-headersexampleThree delivery rows with owner and due-date headers
status-timelineexampleStatus timeline (row sublabels, status-colored spans, change events)
torture-long-labelstortureTorture: long names at a generous size read whole, never cut
item-labels-offtortureRows and status remain when item labels are off
five-nearby-milestonestortureFive nearby milestones retain their names
item-date-contentexampleItem dates selected without names
dense-milestone-leaderstortureLeaders of eighteen nearby milestones cross no label
milestone-lane-tall-rowsexampleBars keep their height in rows a milestone lane makes tall
adjacent-milestone-bandstortureNeighboring rows keep their milestone labels
column-overridesexampleWidths, alignment and heads set per column: a wide name column, the owner flush right and a renamed status head
meta-after-plotexampleOwner and status columns on the far side of the bars

Not for

Steps without dates; gantt places spans and events on a calendar.