Skip to content

Box Plot Chart

The Box Plot Chart summarises the distribution of a numeric field per category using the shared boxplotStats transform: a box spanning the interquartile range (Q1–Q3), a median line, whiskers to the 1.5×IQR fences, and outlier points. It's the standard view for comparing spread and skew across groups.

NOTE

For the full API, see the Charts API Reference.

Example

Usage

ts
import {
    createBoxPlotChart,
} from '@ripl/charts';

const chart = createBoxPlotChart('#container', {
    data: [/* ... */],
    group: 'region',
    value: 'latency',
});

Data Format

Each item contributes one numeric value to a category. The chart groups items by the group accessor and summarises the value accessor per group — no pre-aggregation required.

Options

  • data — The data array
  • group — Accessor for the category (field name or function)
  • value — Accessor for the numeric value (field name or function)
  • categories — Explicit category order (default: first-seen order)
  • color — Box colour (default: first palette colour)
  • format — Format applied to summary values in tooltips