Components

BoxPlot

Compare distributions with explicit quartiles, whiskers and outliers.

Loading chart…

Caller-computed response time summaries, in milliseconds
EndpointLower whisker (ms)Q1 (ms)Median (ms)Q3 (ms)Upper whisker (ms)Outlier (ms)
Search1832446184112
Checkout26466888126154
Profile122231467298

Usage

Supply caller-computed quartiles, whiskers and outliers to BoxPlotSeries.

Composition
<Chart.Root config={config}>
  <Chart.Legend />
  <Chart.ResponsiveContainer width="100%" height={280}>
    <Chart.BoxPlotChart data={data} animate accessibilityLayer aria-label="Response time distributions">
      <Chart.CartesianGrid vertical={false} />
      <Chart.XAxis dataKey="period" />
      <Chart.YAxis type="number" domain={[0, 180]} />
      <Chart.BoxPlotSeries<(typeof data)[number]>
        dataKey={(row) => ({
          lowerWhisker: row.lowerWhisker,
          q1: row.q1,
          median: row.median,
          q3: row.q3,
          upperWhisker: row.upperWhisker,
          outliers: [row.outlier],
        })}
        seriesKey="latency"
        barSize={32}
      />
      <Chart.Tooltip content={({ active, payload }) =>
        active && payload?.[0] ? (
          <div data-kind-ui="chart-tooltip">
            Median: {payload[0].payload.median} ms
          </div>
        ) : null
      } />
    </Chart.BoxPlotChart>
  </Chart.ResponsiveContainer>
</Chart.Root>

The tooltip reads the original row from payload to label statistics; native range values alone describe only the enclosing extent.

Summary contract

Supply finite ordered statistics: lowerWhisker <= q1 <= median <= q3 <= upperWhisker. Outliers must be finite and strictly outside the whiskers; duplicates remain separate, possibly overlapping marks.

Numeric domains must include every outlier; native domain inference includes them.

Compute quartiles, whiskers and outliers before rendering; Kind chooses no statistical convention. Boxes span Q1–Q3, lines mark medians and whiskers, and circles show outliers.

Equal quartiles collapse to a line. Equal whiskers, zero and negative values are valid. Missing summaries or empty data draw no marks; malformed present summaries throw.

Collapsed and missing summaries

Stable and Zero have collapsed summaries; Pending has no mark but retains its category label. Variable includes negative values and outliers.

Loading chart…

Caller-computed change summaries, in percentage points; missing values are not zero
GroupSummary (percentage points)
StableLower whisker, Q1, median, Q3 and upper whisker: 5. No outliers.
ZeroLower whisker, Q1, median, Q3 and upper whisker: 0. No outliers.
PendingMissing summary; no mark.
VariableLower whisker: -12; Q1: -5; median: 1; Q3: 8; upper whisker: 18; outliers: -20, 24.

Horizontal distributions

Use layout="vertical" with numeric X and categorical Y axes for horizontal boxes.

Loading chart…

Caller-computed response time summaries, in milliseconds
EndpointLower whisker (ms)Q1 (ms)Median (ms)Q3 (ms)Upper whisker (ms)Outlier (ms)
Search1832446184112
Checkout26466888126154
Profile122231467298

Materials

Choose plain, paper, clay or glow. Explicit filter or style.filter overrides the finish; custom shapes can compose BoxPlotMark directly.

Loading chart…

Caller-computed response time summaries, in milliseconds
EndpointLower whisker (ms)Q1 (ms)Median (ms)Q3 (ms)Upper whisker (ms)Outlier (ms)
Search1832446184112
Checkout26466888126154
Profile122231467298

API reference

Focused props for explicit range-Bar composition. BoxPlot uses public axis-scale hooks; it has no configured wrapper.

BoxPlotChart

PropTypeDefaultDescription
dataRow[]—Consumer-owned observations containing summaries or accessor inputs.
layout"horizontal" | "vertical""horizontal"Native layout; "vertical" gives horizontal boxes with numeric X and categorical Y axes.
animateboolean | BarAnimationfalseChart-owned clipped entrance; respects reduced motion. Native per-series animation is disabled.
accessibilityLayerbooleantrue in RechartsNative keyboard inspection. Set explicitly in these components.
aria-label / aria-labelledbystring—Accessible plot name.
childrenReactNode—Explicit series, axes, grid and tooltip.

Custom range shapes retain inspection but cannot use Bar category emphasis. See Recharts BarChart.

BoxPlotSeries

PropTypeDefaultDescription
dataKey(keyof Row & string) | ((row: Row) => BoxPlotSummary | null | undefined)RequiredDirect property name or accessor; nested string paths are not interpreted.
seriesKeystringRequiredRoot metadata, color and visibility identity, independent of the generated range accessor.
material"plain" | "paper" | "clay" | "glow""plain"Static mark finish. Explicit filters and custom shapes retain ownership.
barSizenumber | stringNative automatic sizingCategory-axis width; numbers are pixels, native percentage strings are also accepted.
outlierRadiusnumber3Radius of each outlier circle in screen pixels.
shape(props: BoxPlotShapeProps) => ReactNodeBuilt-in markReceives original summary, native Bar shape props and mapped coordinates. Owns returned markup.
markPropsSVG group props, excluding children—Attributes, styles, handlers and refs forwarded to each present mark group.
xAxisId / yAxisIdstring | number0Native axes used to map statistical values.
hidebooleanfalseNative hiding; Root controlled visibility also applies.

Stacking, minPointSize, background, radius and activeBar are excluded. Cells, labels and handlers remain available. LabelList positions refer to the enclosing range. See Recharts Bar.

BoxPlotMark

Renders caller-owned screen coordinates; it neither computes statistics nor maps domains.

PropTypeDefaultDescription
coordinatesBoxPlotSummaryRequiredAlready mapped screen coordinates; these can reverse on a vertical numeric scale.
centernumberRequiredCategory-axis center in pixels.
sizenumberRequiredCategory-axis mark width in pixels.
orientation"vertical" | "horizontal""vertical"Direction of the quantitative geometry.
outlierRadiusnumber3Screen-space circle radius.
material"plain" | "paper" | "clay" | "glow""plain"Static finish; explicit group filters take precedence.
strokeWidthSVG stroke width1.5Native stroke width; explicit SVG paint stays consumer-owned.

BoxPlotSummary and helpers

PropTypeDefaultDescription
lowerWhisker / upperWhiskernumberRequiredCaller-defined finite whisker endpoints.
q1 / q3numberRequiredCaller-computed finite quartiles, ordered within whiskers.
mediannumberRequiredFinite value between Q1 and Q3.
outliersreadonly number[]—Finite observations strictly outside the supplied whiskers.

validateBoxPlotSummary returns valid input unchanged, returns null for missing input, and throws for malformed summaries. boxPlotExtent returns the validated minimum/maximum including outliers. Neither mutates input.

Shared components

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