Waffle chart
CoreA ten by ten unit chart where every cell is one percent, and cells fly to their new group when the data changes.
pnpm dlx shadcn@latest add https://wui.alann.works/r/waffle-chart.jsonAPI Reference
| Prop | Type | Default |
|---|---|---|
data* | WaffleCategory[] | required |
label* | string | required |
unit | string | — |
formatValue | (value: number, category: WaffleCategory) => string | — |
rows | number | — |
columns | number | — |
accentKey | string | null | — |
activeKey | string | null | — |
defaultActiveKey | string | null | — |
onActiveChange | (key: string | null) => void | — |
legend | boolean | — |
decimals | number | — |
emptyLabel | string | — |
ref | Ref<HTMLElement> | — |
className | string | — |