BarChart
A vertical bar chart for comparing values across categories, with optional stacking.
Installation
npx dafink-ui add bar-chartRequires: recharts
Demo
Props
| Name | Type | Default | Description |
|---|---|---|---|
| data | ChartDataPoint[] | - | Array of data objects. |
| xKey | string | - | Key to use as the x-axis label. |
| series | ChartSeries[] | - | Bar groups to render. |
| stacked | boolean | false | Stack series on top of each other. |
| height | number | 240 | Chart height in px. |
| showLegend | boolean | true | Whether to show the legend. |
| showGrid | boolean | true | Whether to show the background grid. |
| className | string | "" | Extra classes applied to the container. |