Gantt chart mode

Set one gantt prop and the grid renders its rows as a task table beside a time chart: one bar per row, placed by its start and finish, nested into a work-breakdown tree, with arrows between linked tasks. It is the same <SvGrid>, the same data and columns - only the presentation changes.

Like Kanban board mode and the scheduler, the Gantt is a pure view of the grid: it renders the grid's already filtered, sorted and searched rows and writes back only through callbacks - it never mutates your data.

Enterprise feature. The gantt prop and its config types are part of the free grid, but the renderer ships in @svgrid/enterprise. Register it once and the view lights up:

import { setLicenseKey, enableGanttView } from '@svgrid/enterprise'
setLicenseKey('YOUR-KEY')   // omit to evaluate, with the watermark and console message
enableGanttView()

installEnterprise(api) also calls enableGanttView() for you. Without the renderer registered, a grid with a gantt prop shows an upgrade note.

Open the live example: Project plan (Gantt)

The whole of it is one prop. This is the grid above, with the columns it shows in the task table and the fields the chart reads:

<script lang="ts">
  import { SvGrid, type GridColumns, type GanttConfig } from '@svgrid/grid'
  import { enableGanttView } from '@svgrid/enterprise'

  enableGanttView()

  type Task = {
    id: string
    name: string
    owner: string
    start: string
    end?: string
    progress: number
    parentId: string | null
    milestone?: boolean
  }

  const data: Task[] = [
    { id: 'p1', name: 'Discovery', owner: 'Priya', start: '2026-09-07', progress: 0, parentId: null },
    { id: 't1', name: 'Interviews', owner: 'Priya', start: '2026-09-07', end: '2026-09-11', progress: 100, parentId: 'p1' },
    { id: 't2', name: 'Synthesis', owner: 'Marco', start: '2026-09-14', end: '2026-09-18', progress: 40, parentId: 'p1' },
    { id: 'm1', name: 'Brief signed off', owner: '-', start: '2026-09-21', progress: 0, parentId: null, milestone: true },
  ]

  const columns: GridColumns<Task> = [
    { field: 'name', header: 'Task', width: 200 },
    { field: 'owner', header: 'Owner', width: 100 },
  ]

  const gantt: GanttConfig<any, Task> = {
    startField: 'start',
    endField: 'end',
    progressField: 'progress',
    parentField: 'parentId',
    milestoneField: 'milestone',
    dependencies: [{ id: 'd1', from: 't1', to: 't2' }, { id: 'd2', from: 't2', to: 'm1' }],
  }
</script>

<SvGrid {data} {columns} getRowId={(r) => r.id} {gantt} />

Pages

More examples

One plan, four views

The same rows as a table, a Gantt, a resource timeline and a Kanban board, each writing back to the one array.

Open the live example: One plan, four views: Grid, Gantt, Scheduler, Kanban (Gantt)

Product roadmap

A year in quarters: initiatives per team with the owner and a status chip drawn inside each bar, releases as milestones, and a status filter.

Open the live example: Product roadmap - a year in quarters (Gantt)

A programme of 640 tasks

Forty sites of sixteen linked tasks each, opening folded to one bar per site, with the critical path across every chain and windowed rows.

Open the live example: A programme of 40 sites, 640 tasks (Gantt)

Portfolio office

A project console: a rail of projects, live KPIs, and a dockable workspace with the editable plan over a risk register and a workload chart.

Open the live example: Portfolio office - project console (Gantt)

See also

Live examples

  • Project plan - A 14-week release as a Gantt: phases nest their tasks and draw a rolled-up summary bar, finish-to-start links draw as arrows, and a violated one turns red. Collapse a phase and its summary keeps the span. Toggle to the Table - same grid rows, just a view. The renderer ships in @svgrid/enterprise.
  • One plan, four views: Grid, Gantt, Scheduler, Kanban - One <SvGrid>, one array, four renderers behind a switch: the plain table with inline editing, the Gantt with phases and links, a resource timeline with a lane per owner, and a Kanban of status lanes. Every view writes back through a callback to the same rows - change a status in the grid and the card moves lane, drag a bar in the Gantt and the timeline follows - and a line under the switcher names the last write.
  • Product roadmap - a year in quarters - The Gantt as a roadmap: three teams, their initiatives across four quarters, and the releases that cut across them as milestones. A `task` snippet draws the owner and a status chip inside each bar, colour is by status, a custom tooltip carries the effort and a summary, the header chips filter by status, and a month / quarter / year zoom ladder drills in with Ctrl+wheel.
  • A programme of 40 sites, 640 tasks - A fibre roll-out at programme scale: 40 sites, each a phase of 16 linked tasks, 640 tasks and 600 links, opening folded to one bar per site. Rows past the viewport are not rendered, the critical path over every chain names the site the finish date turns on, baselines count the sites running late, and the search box filters the whole thing. Ctrl+wheel to the week preset and the weekends fold out of the axis.
  • Portfolio office - project console - A PMO console with the Gantt as the hero: a rail of projects with health and percent complete, live KPIs, and a dockable workspace (SvDockManager) with the plan over a risk register and a remaining-work chart. The plan runs with the critical path and baselines on and is editable; drag a task and the register, the chart and the KPIs recompute from the same rows.

Related articles

  • Sparkline Cells in a Svelte Data Grid - Show inline trend sparklines inside grid cells using SvGrid's built-in sparkline column property - no charting library needed, just a field that holds a number array.