React Component Kit
Back to Chart
Chart

Stacked bar chart

A vertical stacked composition with grouped datasets, formatted tooltips, and a legend.

Interactive bar chart with 3 datasets.Revenue compositionNew businessExpansionRenewal

API

PropTypeDefaultDescription
type*"line" | "bar" | "radar" | "donut" | "pie" | "polarArea" | "bubble" | "scatter"Chart controller used to render the supplied data.
data*ChartDataChart.js-inspired labels and datasets configuration.
optionsChartOptions | ChartRadialOptions{}Typed subset for responsive sizing, axes, legends, tooltips, titles, styling, and animation.
heightnumber | stringExplicit chart height. Without it, the wrapper keeps a readable minimum height and responsive aspect ratio.
showDataTablebooleanfalseRenders a visually hidden accessible table containing the chart data.
fallbackReact.ReactNodeContent shown when the chart has no usable data.
classNamestringMerged onto the responsive chart wrapper.
ChartDataset.data*(number | null | { x: number; y: number; r?: number })[]Numeric values for line/bar/radial charts or coordinate points for scatter/bubble charts.
ChartDataset.type / stack"bar" | "line" / stringOptional Cartesian dataset controller and stack group. Use dataset types together for mixed bar-line charts.
ChartDataset.backgroundColor / borderColorstring | string[]Single or per-point colors; defaults to the kit palette and theme tokens. Pie and donut charts are intentionally borderless.
ChartDataset.fill / tension / pointRadius / showLineboolean | numberLine and point rendering controls used by line, radar, scatter, and bubble charts.
options.plugins.legend / tooltip / titleChartLegendOptions | ChartTooltipOptions | ChartTitleOptionsControls chart chrome, hover feedback, titles, and clickable dataset visibility.
ChartTitleOptions.align"start" | "center" | "end"startAligns the chart title to the start, center, or end of the chart. String titles stay on one row; pass an array to provide explicit title rows.
ChartTitleOptions.fontSizenumber15Sets the chart title's rendered size in pixels and is normalized across radial and Cartesian chart viewports. The default is 15; use a string for a single-row title or an array for explicit multiline content.
options.plugins.threeDChartThreeDOptions (pie/donut only)Opt-in oblique SVG pie/donut projection with a 28-unit default depth, complete colored outer, inner, and radial sidewalls, an elliptical top face, perspective, and labels.
options.scales.x / y / rChartScaleOptionsAxis visibility, bounds, grid, tick formatting, titles, and stacking.
options.scales.*.ticksChartTicksOptionsTick formatting with automatic dense-label skipping, tick limits, and optional rotation controls.
options.animationfalse | ChartAnimation{ duration: 900, easing: 'easeOutQuart' }Mount/update animation settings with an optional completion callback.
options.transitions.show / hidefalse | ChartAnimation{ duration: 450, easing: 'easeOutQuart' }Overrides the legend dataset show/hide transition; rapid toggles reverse from the current geometry.
options.transitions.hoverfalse | ChartAnimation{ duration: 180, easing: 'easeOutCubic' }Overrides animated pie, donut, and polar-area sector hover expansion. The transition respects reduced-motion preferences and does not enable 3D on polar-area charts.
options.responsive / maintainAspectRatio / aspectRatio / indexAxisboolean | number | 'x' | 'y'Responsive sizing, aspect-ratio behavior, and horizontal Cartesian layout.
View full API on Chart

More Chart examples