Klar

Charts / React basic charts / Distribution

Box plot

Median, quartiles and 1.5 × IQR whiskers per group, computed from the raw values, with outliers as dots, a mean marker and sample sizes.

React component BoxPlot, data through props. The shape of many values: swarms, ridges, heat. Tags: box plot, box and whisker, quartiles, median, outliers, distribution, spread.

Install

npm i klar-charts

import 'klar-charts/styles.css'
import { ThemeScope, BoxPlot } from 'klar-charts'

# or copy the source:
npx shadcn@latest add https://klar.run/r/basic-box-plot.json

Usage

<BoxPlot
  groups={latencyByRegion}
  orientation={o as 'vertical' | 'horizontal'}
  height={o === 'vertical' ? 388 : undefined}
  rowHeight={56}
  reference={SLO_MS}
  referenceLabel="SLO 500 ms"
  unit="ms"
  ariaLabel="Checkout API latency by region, in milliseconds"
/>

Related box plot charts