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

Anatomy

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

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

All props accepted by this component, with their type, default value and 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
required
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

Content slots exposed by this component.

#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

Events emitted by this component.

@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.

Customisation

CSS variables

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

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

Accessibility

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

ARIA roles

figure
img
button

Keyboard interactions

Keyboard interactions
KeyAction
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.

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 wrapper background.
color
var(--origam-color__surface---inverse)
Tooltip background colour.
dimension
var(--origam-space---3)
Gap between legend items.

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.

Stack mode — person icons

vue

Fill mode — thermometer effect

vue