Gantt Chart
The Gantt Chart displays tasks as horizontal bars along a time axis, with task names on the y-axis. Each bar can show a progress overlay, and a configurable "today" marker highlights the current date. It supports animated transitions when tasks are added, removed, or rescheduled, plus tooltips and grid lines.
NOTE
For the full API, see the Charts API Reference.
Example
Usage
ts
import {
createGanttChart,
} from '@ripl/charts';
const chart = createGanttChart('#container', {
data: [...],
key: 'id',
label: 'name',
start: 'start',
end: 'end',
progress: 'progress', // optional, 0–1
showToday: true,
});
// Update data
chart.update({ data: newData });Options
data— The data array (one item per task)key— Unique key accessor per tasklabel— Label accessor for y-axis task namesstart— Start date accessorend— End date accessorcolor— Optional color accessor per taskprogress— Optional progress accessor (0–1)grid—boolean | ChartGridOptions— Show/configure grid linestooltip—boolean | ChartTooltipOptions— Show/configure tooltipsaxis—boolean | ChartAxisOptions— Configure axesshowToday— Show a vertical "today" marker line (defaulttrue)todayColor— Color for the today marker (default#ef4444)borderRadius— Bar corner radius (default3)padding— Chart padding