ChartBoxPlot

Data Visualization
stable

Box-and-whisker plot engine. Renders one box per category showing the five-number statistical summary (min / Q1 / median / Q3 / max) plus optional outlier dots. Accepts pre-aggregated data or raw sample arrays.

Structure

Anatomy

Visual breakdown of the component's internal structure with BEM class call-outs.

Anatomy of OrigamChartBoxPlotSchematic showing a box, whiskers and outlier dot. 1 2 3 4 5
Anatomy of <origam-chart-box-plot> — 5 visual parts per category slot: root ①, IQR box ②, median line ③, whiskers ④, outlier dots ⑤.
1.origam-chart-box-plot
Root SVG element containing all box plots.
2.origam-chart-box-plot__box
IQR rectangle from Q1 to Q3.
3.origam-chart-box-plot__median
Horizontal line at the median (Q2).
4.origam-chart-box-plot__whisker
Vertical whisker lines extending from Q1/Q3 to min/max fences, plus cap segments.
5.origam-chart-box-plot__outlier
Outlier dot circles rendered when showOutliers=true.

API

Props

All props accepted by this component, with their type, default value and description.

categories
Array<string>
[]
Explicit category order. When absent the order is inferred from the first occurrence of each category in series[0].data.
boxWidth
number
0.6
Box width as a fraction of the per-category slot width. Range [0, 1].
whiskerCapWidth
number
0.4
Whisker cap width as a fraction of the per-category slot width. Range [0, 1].
showOutliers
boolean
true
Render outlier dots beyond the whisker fences.
showAxis
boolean
true
Render X and Y axes.
showGrid
boolean
true
Render horizontal grid lines.
yMin
number
Override the auto-computed Y-axis minimum. When absent the component uses min(data) − 10% padding.
yMax
number
Override the auto-computed Y-axis maximum. When absent the component uses max(data) + 10% padding.
xAxisFormat
(value: string | number) => string
Formatter applied to X-axis category labels.
yAxisFormat
(value: number) => string
Formatter applied to Y-axis tick values.
series
required
Array<IChartSeries>
[]
Data series array. Each series data entry must be an IChartBoxPlotDatum (pre-aggregated) or IChartBoxPlotRawDatum (raw samples).
title
string
Optional title rendered above the plotting area.
subtitle
string
showLegend
boolean
true
Toggle the legend block.
legendPosition
TChartLegendPosition
showTooltip
boolean
animated
boolean
true
Animate on first paint. Respects prefers-reduced-motion.
animationDuration
number
Palette cycled when a series has no explicit color.
aspectRatio
string
id
string
class
string | Array<string> | object
style
string | Array<string> | object | StyleValue
height
number | string
300
Chart height in pixels or a CSS length.
maxHeight
number | string
maxWidth
number | string
minHeight
number | string
minWidth
number | string
width
number | string
margin
boolean | number | string
marginTop
boolean | number | string
marginLeft
boolean | number | string
marginBottom
boolean | number | string
marginRight
boolean | number | string
marginBlock
boolean | number | string
marginInline
boolean | number | string
marginInlineStart
boolean | number | string
marginInlineEnd
boolean | number | string
marginBlockStart
boolean | number | string
marginBlockEnd
boolean | number | string
padding
boolean | number | string
paddingTop
boolean | number | string
paddingLeft
boolean | number | string
paddingBottom
boolean | number | string
paddingRight
boolean | number | string
paddingBlock
boolean | number | string
paddingInline
boolean | number | string
paddingInlineStart
boolean | number | string
paddingInlineEnd
boolean | number | string
paddingBlockStart
boolean | number | string
paddingBlockEnd
boolean | number | string
rounded
boolean | number | string | TRounded | null | undefined
roundedTopRight
boolean | number | string
roundedTopLeft
boolean | number | string
roundedBottomLeft
boolean | number | string
roundedBottomRight
boolean | number | string
roundedStartStart
boolean | number | string
roundedStartEnd
boolean | number | string
roundedEndStart
boolean | number | string
roundedEndEnd
boolean | number | string
elevation
TElevation
bgColor
TColor
fontSize
TFontSize
fontWeight
TFontWeight

API

Slots

Content slots exposed by this component.

#tooltip
Override the default tooltip card. Receives the full five-number summary plus IQR and outlier count.
#legend-item
Replace one legend entry.
#title
Replace the title and subtitle block.
#empty
Rendered when series is empty or every series is hidden.

API

Emits

Events emitted by this component.

@point-click
IChartPoint, MouseEvent | KeyboardEvent
Mouse or keyboard activation on a data point (box, whisker or outlier).
@legend-click
IChartSeries, number
Click on a legend entry.
@series-toggle
IChartSeries, boolean
Resulting visibility flip after a legend click.

Customisation

CSS variables

CSS custom properties exposed by this component. Override them to customise the component without losing theme compatibility.

Chart container background colour.
Axis line colour.
Grid line colour.
Animation duration for enter/update transitions.

Inclusion

Accessibility

ARIA roles, keyboard navigation and focus management. Sourced from the real component template.

ARIA roles

img

Keyboard interactions

Keyboard interactions
KeyAction
TabMoves focus to interactive data points.
Enter / SpaceFires point-click emit on the focused data point.

Notes

  • The animated prop respects prefers-reduced-motion: reduce.
  • The #empty slot provides a meaningful message when no data is available.

Foundation

Design tokens

Excerpt from this component's token declarations — the --origam-<component>---<property> variables, declared in its hand-maintained token sheet with no build step.

Source
color
var(--origam-color__surface---default)
Chart container background.
color
var(--origam-color__border---default)
Axis line colour.
color
var(--origam-color__border---subtle)
Grid line colour.
duration
600ms
Animation duration.
color
var(--origam-color__surface---inverse)
Tooltip background.

Interactive

Playground

Edit props live and see the component update in real time. The generated code snippet updates as you change values.

Rendering the live preview…

Usage

Examples

Ready-to-paste code snippets for your templates.

Pre-aggregated data

vue

Ecosystem

Family

Components from the same folder that share conventions and often compose together.