Bar Chart
Compare values across categories with vertical, horizontal, and stacked bars.
Usage
Stacked & Horizontal
Use stacked and horizontal props.
Config Reference
| Property | Type | Default | Description |
|---|---|---|---|
series | { name: string; data: number[] }[] | required | Array of data series |
xAxis | { categories: string[] } | required | Category labels for the X axis |
stacked | boolean | false | Stack bars on top of each other |
horizontal | boolean | false | Render bars horizontally |
barWidth | string | number | - | Width of each bar (e.g. '50%' or 20) |
barGap | string | - | Gap between bars in the same category |
dataLabels | { enabled?: boolean } | { enabled: false } | Show values on bars |