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
Anatomie
Décomposition visuelle de la structure interne du composant avec les appels de classes BEM.
<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
Toutes les props acceptées par ce composant, avec leur type, valeur par défaut et 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.
- seriesrequisArray<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
Emplacements de contenu exposés par ce composant.
- #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
Événements émis par ce composant.
- @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.
Personnalisation
Variables CSS
Propriétés CSS personnalisées exposées par ce composant. Surchargez-les pour personnaliser sans perdre la compatibilité avec le thème.
- Chart container background colour.
- Axis line colour.
- Grid line colour.
- Animation duration for enter/update transitions.
Inclusion
Accessibilité
Rôles ARIA, navigation clavier et gestion du focus. Sourcé depuis le template réel du composant.
Rôles ARIA
Interactions clavier
| Touche | 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.
Fondation
Design tokens
Extrait des tokens de ce composant — les variables --origam-<composant>---<propriété>, déclarées dans sa feuille de tokens tenue à la main, sans étape de build.
- 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.
Interactif
Playground
Modifiez les props en direct et observez le composant se mettre à jour. Le snippet de code généré suit vos changements.
Rendu de l’aperçu en cours…
Usage
Exemples
Extraits de code prêts à coller dans vos templates.
Pre-aggregated data
Écosystème
Famille
Composants du même dossier qui partagent les conventions et se composent souvent ensemble.