BarChart
v1.0.11Updated 20 Oct 2026Recharts-backed bar chart with grouped, stacked, horizontal, and color-by-point variants. The default categorical comparison chart.
Preview
Live · 11 stories▸Why this is recommendedchartbarrechartscategorical+2
The default, out-of-the-box BarChart.
- ✓Categorical comparison
- ✓Period-over-period bars
- ✓Top-N rankings
- Grouped / stacked / horizontal layouts
- Color-by-point
- Hover tooltip + legend
- Responsive container
- categoryAxisWidth — widen the horizontal category axis so long labels do not clip
- MiniBar variant for inline / table cells
- i18n: numbers/axis values format per LocaleProvider locale
- ✕Continuous time-series (use LineChart / AreaChart)
- ✕Part-of-whole (use PieChart)
Install
Ask your agent, or call the MCP tool directly. The resolved bundle is written into your project.
Usage
Tick variants in the left menu — each adds a tab with that variant’s real story source, the same code the preview above renders.
Props
dataRows of categorical data
yeslayoutBar orientation
—stackedStack series
—categoryAxisWidthWidth (px) reserved for the category axis labels in horizontal mode. Default 64; raise it when long category names (20–25 chars) would otherwise clip to their trailing characters
—allowDecimalsLet the value axis place fractional ticks. Defaults to false for the whole-number formats (integer, currency) so a series whose maximum is 1 does not render a rounded, repeating axis (0, 0, 1, 1, 1)
—tickCountHow many ticks the value axis should aim for. Defaults to five, or to the number of whole steps the data spans when that is fewer, so a single-count series reads 0, 1
—