ChartHoneycomb

Data Display
stable

Hexagonal tile-map chart. Renders a grid of SVG <polygon> hexagons positioned by (x=col, y=row) indices. Supports pointy-top and flat-top orientations, categorical and heatmap colour modes.

Structure

Anatomy

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

Anatomy of OrigamChartHoneycombSchematic of the ChartHoneycomb component with 5 numbered internal parts. __header (title) A B C D E 1 2 3 4 5 ② tile polygon — points computed by tileSize × orientation; ③ label centred at (cx, cy)
Anatomy of <origam-chart-honeycomb> — 5 internal parts. Hexagon points computed in JavaScript from tileSize and orientation.
1.origam-chart-honeycomb
Root element. CSS grid with areas: header / body / legend. role="figure" + aria-label from title.
2.origam-chart__honeycomb-tile
SVG for each tile. Points computed from tileSize, col/row index and orientation. tabindex="0" + role="button".
3.origam-chart__honeycomb-label
Text centred at the tile's (cx, cy). Shows name or formatted value. Hidden when showLabel=false.
4.origam-chart__honeycomb-tile--active
BEM modifier applied on hover/focus — adds brightness filter.
5.origam-chart-honeycomb__header
Title and subtitle block. Rendered only when title or subtitle is provided.

API

Props

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

orientation
TChartHoneycombOrientation
'pointy-top'
Hex vertex orientation. 'pointy-top' = vertex at top (default). 'flat-top' = flat edge at top.
colorMode
TChartHoneycombColorMode
'categorical'
Colour strategy. 'categorical' cycles the colorScheme palette; 'heatmap' interpolates value between heatmapColorRange endpoints.
heatmapColorRange
[TIntent | string, TIntent | string]
['info', 'danger']
Two-stop colour range for colorMode="heatmap". First = min value colour; second = max value colour.
tileSize
number
30
Hex side-length in SVG user units. Controls how large each tile is.
tileGap
number
2
Gap between adjacent tiles in SVG user units.
showLabel
boolean
true
Renders the tile's name (or value when name is absent) centred in the tile.
xAxisFormat
(value: number | string) => string
Column index formatter used in tooltips.
yAxisFormat
(value: number) => string
Row index formatter used in labels and tooltips.
series
required
Array<IChartSeries>
—
Data series — only series[0] is consumed. Each datum must supply x (col), y (row) and optionally name, value, color.
categories
Array<string>
title
string
Optional title rendered above the plotting area.
subtitle
string
Optional subtitle rendered below the title.
showLegend
boolean
true
Renders the ChartLegend block.
legendPosition
TChartLegendPosition
'bottom'
Position of the legend: 'top' | 'bottom' | 'left' | 'right'.
showTooltip
boolean
true
Shows a tooltip on hover/focus with the tile name and value.
animated
boolean
true
Fades tiles in on first paint. Respects prefers-reduced-motion.
animationDuration
number
600
Entry animation duration in ms.
colorScheme
Array<TIntent | string>
[]
Palette cycled in categorical mode. Defaults to the 8 origam intent colours when empty.
aspectRatio
string
CSS aspect-ratio shortcut. When set, overrides height.
id
string
class
string | Array<string> | object
style
string | Array<string> | object | StyleValue
height
number | string
400
Component height. Accepts a CSS length or a number (converted to 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 applied to the chart root.
fontSize
TFontSize
fontWeight
TFontWeight

API

Slots

Content slots exposed by this component.

#tile-label
#tooltip
Replaces the default tooltip body for a hovered tile.
#legend-item
Replaces one legend entry with custom markup.
#title
Replaces the default title/subtitle block.
#empty
Shown when series is empty or every tile is hidden.

API

Emits

Events emitted by this component.

@point-click
IChartPoint, MouseEvent | KeyboardEvent
Fired when the user clicks or keyboard-activates a tile.
@legend-click
IChartSeries, number
Fired when the user clicks a legend entry.
@series-toggle
IChartSeries, boolean
Fired after a legend click with the intended next visibility value.

Customisation

CSS variables

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

Gap between header, body and legend areas.
Internal padding of the chart root.
Entry animation duration. Driven by animationDuration prop.
Stroke colour applied to each tile polygon (creates gap between tiles).
Stroke width of tile polygons.
Font size of the centred tile label.
Font weight of the centred tile label.
Fill colour of the centred tile label.
Font size of the chart title.

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 through each hex tile (tabindex="0") and legend items.
Enter / SpaceActivates the focused tile, firing the point-click emit.

Notes

  • Root has role="figure" with aria-label from the title prop (falls back to "honeycomb chart").
  • The SVG carries role="img" with a <title> and <desc> listing the tile count.
  • Each tile has aria-label derived from its name and value (e.g. "A: 42").
  • Entry animations are disabled via @media (prefers-reduced-motion: reduce).

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.

Categorical honeycomb

vue

Heatmap colour mode

vue

Flat-top orientation

vue

Ecosystem

Family

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