Preview Updated 2026-05-10

MarimekkoChart

Variable-width stacked bars — column width encodes one dimension's share, in-bar segments encode another, answering "which region is biggest + what's the product mix inside" in one chart.

Basic usage

Each column is one category (region / period); its width = column total / grand total. Segments inside stack vertically by value share. Classic for market share, order composition, demographic breakdown.

背景 视口

API

PropTypeDefaultDescription
columns{ label, segments: { label, value, color? }[] }[]Column data
heightnumber320Pixel height
showColumnLabelsbooleantrueTop label + bottom %
showSegmentLabelsbooleantrueInline segment label when cell is large enough
format(v, seg, col) => stringTooltip value formatter
palettestring[]viz-1..8Default segment colors
ariaLabelstringSR label
size'sm' | 'md' | 'lg''md'Font scale

Events: @hover / @select (React onHover / onSelect). Payload { column, segment, columnShare, segmentShare, cellShare }.

反馈与讨论

MarimekkoChart · Discussion

0
0 / 600
正在加载评论...