BarGanttChart
The BarGanttChart component visualizes time intervals across multiple categories, making it ideal for illustrating schedules, timelines, or task durations. It displays bars that span from a start to an end value on a continuous axis, grouped by labeled categories.
Usage
Props
labelOnYAxis?: boolean
If true, the category labels will be displayed on the Y-axis, and bars will extend horizontally along the X-axis (typical Gantt chart layout).
Default is false, which would render a vertical layout with labels on the X-axis.
marks: Array<object> (required)
Defines the time intervals for each bar. Each object must include:
-
label: stringThe category label associated with the time interval (e.g., task or job name). -
start: numberThe starting value (usually representing time or progress) of the bar. -
end: numberThe ending value of the bar. The bar will visually span fromstarttoend.
Additional ChartMarkProps can also be provided for customization.
Example
Execution
Use Cases
BarGanttChart is ideal for:
- Project planning and task scheduling
- Visualizing task overlaps and durations
- Representing resource allocation over time
