ChartPictorial

Data Display
stable

Pictorial / isotype chart where each data value is represented as a column of repeated SVG icons. Supports stack mode (rows of small icons) and fill mode (single large icon clip-masked to the fill ratio).

Structure

Anatomie

Décomposition visuelle de la structure interne du composant avec les appels de classes BEM.

Anatomy of OrigamChartPictorialSchematic of the ChartPictorial component with 7 numbered internal parts. origam-chart-pictorial ① __header ② __body ③ __column ④ __axis-label __icon--empty ⑤ __icon--filled ⑥ __value-label ⑦ origam-chart-legend
Anatomy of <origam-chart-pictorial> — 7 internal parts. The SVG hosts columns ④ containing empty ⑤ and filled ⑥ icon <use> elements plus optional value labels ⑦.
1.origam-chart-pictorial
Root wrapper. CSS grid: header / body / legend rows.
2.origam-chart-pictorial__header
Optional title + subtitle block.
3.origam-chart-pictorial__body
Plot area hosting the SVG and the empty slot.
4.origam-chart-pictorial__column
One column per data point. Keyboard-focusable (role="button", tabindex="0").
5.origam-chart-pictorial__icon--empty
Background (unfilled) icon slots filled with emptyIconColor.
6.origam-chart-pictorial__icon--filled
Filled icon slots. In fill mode these use a for the thermometer effect.
7.origam-chart-pictorial__value-label
Formatted value text rendered adjacent to the column when showLabel=true.

API

Props

Toutes les props acceptées par ce composant, avec leur type, valeur par défaut et description.

icon
string
person silhouette path
SVG <path d="…"> string for the icon drawn per slot. Must fit a viewBox="0 0 24 24" coordinate system.
Colour applied to all filled icons. When omitted, cycles through colorScheme by series index.
emptyIconColor
string
'rgba(0,0,0,0.1)'
Colour of background (unfilled) icon slots.
iconsPerUnit
number
1
How many data units one icon represents. E.g. iconsPerUnit=10 → value 65 renders 7 filled icons (rounded).
direction
TDirection
'vertical'
Icon stacking direction: vertical (bottom-to-top) or horizontal (left-to-right).
mode
TChartPictorialMode
'stack'
Rendering mode. stack = classic isotype (rows of repeated icons). fill = one large icon clip-masked to the fill ratio (thermometer effect).
showLabel
boolean
true
Display the raw value label above (vertical) or to the right (horizontal) of each column.
showAxis
boolean
true
Display the X-axis category labels below each column.
xAxisFormat
(value: string | number) => string
Formatter applied to X-axis category labels. Identity by default.
yAxisFormat
(value: number) => string
Formatter applied to value labels. String(value) by default.
series
requis
Array<IChartSeries>
—
Data series. Each series contains a name and an array of numeric values. Multiple series render side-by-side columns.
categories
Array<string>
[]
X-axis category labels, one per data point.
title
string
Optional title rendered above the chart area.
subtitle
string
Optional subtitle rendered below the title.
showLegend
boolean
true
Toggle the legend block.
legendPosition
TChartLegendPosition
'bottom'
Anchor of the legend block: top, bottom, left or right.
showTooltip
boolean
true
Toggle the hover tooltip.
animated
boolean
true
Animate icons on first paint. Respects prefers-reduced-motion.
animationDuration
number
600
Animation duration in milliseconds.
Palette cycled by series index when iconColor is not set.
aspectRatio
string
CSS aspect-ratio shortcut (e.g. "1/1"). Overrides height when set.
id
string
class
string | Array<string> | object
style
string | Array<string> | object | StyleValue
height
number | string
Chart wrapper height. Accepts CSS length or number (→ px).
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
Background colour of the chart wrapper.
fontSize
TFontSize
fontWeight
TFontWeight

API

Slots

Emplacements de contenu exposés par ce composant.

#tooltip
Replace the default tooltip card. Receives the hovered point, its series and the category label.
#empty
Rendered when series is empty or all series have no data.
#legend-item
Replace one legend entry with custom content.
#title
Replace the default title + subtitle block.

API

Emits

Événements émis par ce composant.

@point-click
IChartPoint, MouseEvent | KeyboardEvent
Fired on click or keyboard activation (Enter/Space) on a column.
@legend-click
IChartSeries, number
Fired when the user clicks a legend entry.
@series-toggle
IChartSeries, 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.

Background colour of the chart wrapper.
Default text colour (inherited by axis labels).
Inner padding of the root wrapper.
Grid gap between header / body / legend rows.
Icon animation duration. Set via animationDuration prop.

Inclusion

Accessibilité

Rôles ARIA, navigation clavier et gestion du focus. Sourcé depuis le template réel du composant.

Rôles ARIA

figure
img
button

Interactions clavier

Interactions clavier
ToucheAction
TabMoves focus between focusable columns (tabindex="0" on each column group).
Enter / SpaceActivates the focused column (fires point-click).

Notes

  • Root div carries role="figure" and aria-label from the title prop (or "Pictorial chart").
  • Inner SVG has role="img" with <title> and <desc> elements summarising series count.
  • Each column group has aria-label with category, value and series name.
  • All CSS animations are disabled under prefers-reduced-motion: reduce.

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.

Source
color
var(--origam-color__surface---default)
Chart wrapper background.
color
var(--origam-color__surface---inverse)
Tooltip background colour.
dimension
var(--origam-space---3)
Gap between legend items.

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.

Stack mode — person icons

vue

Fill mode — thermometer effect

vue