Components

Combo Chart

Combine bars, lines and areas to compare related measures.

Loading chart…

Monthly production in units
MonthCapacity (units)Shipped (units)Target (units)
Jan960640700
Feb960730720
Mar1040780760
Apr1040860820
May1120920880
Jun11201020960

Usage

Combine BarSeries, AreaSeries and LineSeries in one plot.

Composition
<Chart.Root config={config}>
  <Chart.Legend />
  <Chart.ResponsiveContainer width="100%" height={280}>
    <Chart.ComboChart data={data} animate accessibilityLayer aria-label="Monthly production in units">
      <Chart.CartesianGrid vertical={false} />
      <Chart.XAxis dataKey="period" />
      <Chart.YAxis domain={[0, 1200]} />
      <Chart.AreaSeries dataKey="capacity" type="stepAfter" fillOpacity={0.18} />
      <Chart.BarSeries dataKey="shipped" maxBarSize={32} />
      <Chart.LineSeries dataKey="target" type="linear" dot={false} strokeDasharray="6 4" />
      <Chart.Tooltip />
    </Chart.ComboChart>
  </Chart.ResponsiveContainer>
</Chart.Root>

Choose each series’ interpolation and paint explicitly. ComboChart uses native composed-chart props, without Line’s configured series or xDataKey shortcuts.

Stacks and two axes

Revenue bars share stack and axis IDs; margin uses a separate percentage axis. Compare each measure on its own scale; matching vertical positions do not mean equal values.

Loading chart…

Monthly revenue and margin
MonthRetail (USD)Wholesale (USD)Margin (%)
Jan420002600018
Feb470002800020
Mar440003400019
Apr520003100023
May580003600025
Jun630003900027

Legend toggles recalculate visible stacks. Matching stackId values stack compatible series on matching axes; they do not merge families. Normalized stacks require explicit axis and tooltip formatting.

Family motion

Choose independent, shared or line-only timing. Independent mode reveals bars over 1000ms and the line over 600ms, showing Area immediately. The example remounts to replay.

Loading chart…

Monthly production in units
MonthCapacity (units)Shipped (units)Target (units)
Jan960640700
Feb960730720
Mar1040780760
Apr1040860820
May1120920880
Jun11201020960

Line/Area reveal across the plot; Bar reveals from numeric zero clamped to its domain. Interaction or data/layout/visibility changes finish entrance; reduced motion disables Kind motion.

API reference

Focused props for explicit composition; upstream references cover additional native geometry.

ComboChart

PropTypeDefaultDescription
dataRow[]—Shared category observations; Kind does not aggregate or transform them.
animateboolean | ComboAnimationfalseChart-owned entrance and inspection motion, respecting reduced motion.
layout"horizontal" | "vertical""horizontal"Native chart orientation; supply matching category and numeric axes.
stackOffset"none" | "expand" | "wiggle" | "silhouette" | "sign" | "positive""none"Native stack calculation; formatting remains consumer-owned.
barCategoryGap / barGapnumber | string"10%" / 4Category and grouped-bar spacing in native geometry.
accessibilityLayerbooleantrue in RechartsKeyboard category inspection; enabled explicitly in these components.
aria-label / aria-labelledbystring—Consumer-supplied accessible plot name.
childrenReactNode—Explicit axes, grid, series and tooltip.

See Recharts ComposedChart.

ComboAnimation

Pass to ComboChart.animate. Family options affect entrances only; hover transitions remain shared. Live reduced-motion changes also settle motion.

PropTypeDefaultDescription
revealDurationMsnumber1000Shared entrance duration in milliseconds.
revealEasingTransition["ease"][0.25, 0.1, 0.25, 1]Motion entrance easing.
lineReveal / areaReveal / barRevealfalse | { revealDurationMs?: number; revealEasing?: Transition["ease"] }Shared optionsOverride one family's duration or easing; false skips its entrance.
hoverTransitionTransitionSpring: 210 stiffness, 28 damping, 0.8 massShared inspection motion; family entrance options do not override it.

BarSeries

PropTypeDefaultDescription
dataKeystring | number | ((row: Row) => unknown)RequiredNative value field or accessor.
seriesKeystringString dataKeyConfig and visibility identity; supply for controlled accessor or numeric keys.
yAxisId / xAxisIdstring | number0Match the explicit native axes.
stackIdstring | number—Stack bars on matching axes; omit for grouped bars.
maxBarSizenumber—Bound native bar thickness.
radiusnumber | [number, number, number, number]0Native corners; stack cap geometry remains consumer-owned.
fillstringConfig colorExplicit paint override.
material"plain" | "paper" | "clay" | "glow""plain"Static bar finish; custom shape, filter or active renderer retains ownership.

Kind disables native per-series animation so ComboChart owns entrances. See Recharts Bar.

LineSeries

PropTypeDefaultDescription
dataKeystring | number | ((row: Row) => unknown)RequiredNative line values.
seriesKeystringString dataKeyConfig and visibility identity.
yAxisId / xAxisIdstring | number0Bind the line to its scale; margin uses the percentage axis.
type"basis" | "basisClosed" | "basisOpen" | "bumpX" | "bumpY" | "bump" | "linear" | "linearClosed" | "natural" | "monotoneX" | "monotoneY" | "monotone" | "step" | "stepBefore" | "stepAfter" or custom curve function"linear"Native interpolation.
stroke / strokeDasharraystringConfig color / —Override line paint and distinguish targets with dashes.
dotboolean or native dot props/renderertrueOrdinary point marks; these components disable them.
connectNullsbooleanfalseConnect gaps explicitly.

Line material choices apply to the line independently of Area and Bar. See Recharts Line and Line components.

AreaSeries

PropTypeDefaultDescription
dataKeystring | number | ((row: Row) => unknown)RequiredNative area values.
seriesKeystringString dataKeyConfig and visibility identity.
yAxisId / xAxisIdstring | number0Bind the area to matching axes.
type"basis" | "basisClosed" | "basisOpen" | "bumpX" | "bumpY" | "bump" | "linear" | "linearClosed" | "natural" | "monotoneX" | "monotoneY" | "monotone" | "step" | "stepBefore" | "stepAfter" or custom curve function"linear"Choose interpolation per area.
stackIdstring | number—Stack areas on matching axes.
fill / strokestringConfig colorOverride fill and outline independently.
fillOpacitynumber0.6 in RechartsKeep the filled context legible behind other marks.
material"plain" | "paper" | "clay" | "glow""plain"Static area finish; explicit shape or filter wins.

See Recharts Area and Area components.

Shared components

Root, SeriesConfig, Axes and grid, Legend, Tooltip, ResponsiveContainer.