ChartBoxPlot
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.
<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.
- categoriesArray<string>[]
- Explicit category order. When absent the order is inferred from the first occurrence of each category in series[0].data.
- boxWidthnumber0.6
- Box width as a fraction of the per-category slot width. Range [0, 1].
- whiskerCapWidthnumber0.4
- Whisker cap width as a fraction of the per-category slot width. Range [0, 1].
- showOutliersbooleantrue
- Render outlier dots beyond the whisker fences.
- showAxisbooleantrue
- Render X and Y axes.
- showGridbooleantrue
- Render horizontal grid lines.
- yMinnumber
- Override the auto-computed Y-axis minimum. When absent the component uses min(data) − 10% padding.
- yMaxnumber
- 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.
- seriesrequiredArray<IChartSeries>[]
- Data series array. Each series data entry must be an IChartBoxPlotDatum (pre-aggregated) or IChartBoxPlotRawDatum (raw samples).
- titlestring
- Optional title rendered above the plotting area.
- subtitlestring
- showLegendbooleantrue
- Toggle the legend block.
- legendPositionTChartLegendPosition
- showTooltipboolean
- animatedbooleantrue
- Animate on first paint. Respects prefers-reduced-motion.
- animationDurationnumber
- Palette cycled when a series has no explicit color.
- aspectRatiostring
- idstring
- classstring | Array<string> | object
- stylestring | Array<string> | object | StyleValue
- heightnumber | string300
- Chart height in pixels or a CSS length.
- maxHeightnumber | string
- maxWidthnumber | string
- minHeightnumber | string
- minWidthnumber | string
- widthnumber | string
- marginboolean | number | string
- marginTopboolean | number | string
- marginLeftboolean | number | string
- marginBottomboolean | number | string
- marginRightboolean | number | string
- marginBlockboolean | number | string
- marginInlineboolean | number | string
- marginInlineStartboolean | number | string
- marginInlineEndboolean | number | string
- marginBlockStartboolean | number | string
- marginBlockEndboolean | number | string
- paddingboolean | number | string
- paddingTopboolean | number | string
- paddingLeftboolean | number | string
- paddingBottomboolean | number | string
- paddingRightboolean | number | string
- paddingBlockboolean | number | string
- paddingInlineboolean | number | string
- paddingInlineStartboolean | number | string
- paddingInlineEndboolean | number | string
- paddingBlockStartboolean | number | string
- paddingBlockEndboolean | number | string
- roundedboolean | number | string | TRounded | null | undefined
- roundedTopRightboolean | number | string
- roundedTopLeftboolean | number | string
- roundedBottomLeftboolean | number | string
- roundedBottomRightboolean | number | string
- roundedStartStartboolean | number | string
- roundedStartEndboolean | number | string
- roundedEndStartboolean | number | string
- roundedEndEndboolean | number | string
- elevationTElevation
- bgColorTColor
- fontSizeTFontSize
- fontWeightTFontWeight
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-clickIChartPoint, MouseEvent | KeyboardEvent
- Mouse or keyboard activation on a data point (box, whisker or outlier).
- @legend-clickIChartSeries, number
- Click on a legend entry.
- @series-toggleIChartSeries, 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
Keyboard interactions
| Key | Action |
|---|---|
| Tab | Moves focus to interactive data points. |
| Enter / Space | Fires 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.
- colorvar(--origam-color__surface---default)
- Chart container background.
- colorvar(--origam-color__border---default)
- Axis line colour.
- colorvar(--origam-color__border---subtle)
- Grid line colour.
- duration600ms
- Animation duration.
- colorvar(--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
Ecosystem
Family
Components from the same folder that share conventions and often compose together.