Documentation Index
Fetch the complete documentation index at: https://mintlify.com/svar-widgets/react-gantt/llms.txt
Use this file to discover all available pages before exploring further.
Baselines
A baseline stores the originally planned dates for each task and renders them as a secondary bar beneath the live task bar. This lets you instantly see whether the current schedule is ahead of, on track with, or behind the original plan.Enabling baselines
Setbaselines={true} on the <Gantt> component to turn on baseline rendering.
Task data structure for baselines
Each task object can carry three additional fields that define its baseline:| Field | Type | Description |
|---|---|---|
base_start | Date | Baseline start date |
base_end | Date | Baseline end date |
base_duration | number | Baseline duration in the configured durationUnit |
baselines={true}, the Gantt renders a baseline bar using the base_start/base_end values. If those fields are absent on a task, no baseline bar is shown for that task.
Capturing a baseline snapshot
A common pattern is to snapshot the current task dates into the baseline fields at project start (or after a re-baseline event):Editing baseline dates in the task editor
Addbase_start, base_end, and base_duration fields to the <Editor> items array to let users view and modify baseline dates directly from the task edit form:
Vertical markers
Markers are labelled vertical lines drawn across the full height of the timeline at a specified date. Use them to mark significant points such as today’s date, sprint boundaries, or project milestones.The markers prop
Pass an array of marker objects to the markers prop:
Marker object structure
| Field | Type | Required | Description |
|---|---|---|---|
start | Date | Yes | The date at which to draw the vertical line |
text | string | No | Label shown on the marker line |
css | string | No | CSS class name applied to the marker element for custom styling |
Styling markers
Use thecss field to apply a custom class and override the default marker colour or style:
When exporting with server-side PDF/PNG export, include any custom marker CSS in the
styles field of the export options so it is applied to the rendered output. See Export for details.Dynamic markers
Becausemarkers is a reactive prop, you can update the markers array at any time — for example, to always show today’s date: