Donut chart
CoreA donut whose arcs morph between datasets, with the active value rolling into the center.
pnpm dlx shadcn@latest add https://wui.alann.works/r/donut-chart.jsonAPI Reference
| Prop | Type | Default |
|---|---|---|
data* | DonutChartDatum[] | required |
label* | string | required |
unit | string | — |
formatValue | (value: number) => string | — |
totalLabel | string | — |
size | number | — |
thickness | number | — |
groupBelow | number | — |
maxSegments | number | — |
otherLabel | string | — |
activeKey | string | null | — |
defaultActiveKey | string | null | — |
onActiveChange | (key: string | null) => void | — |
hiddenKeys | string[] | — |
defaultHiddenKeys | string[] | — |
onHiddenKeysChange | (keys: string[]) => void | — |
legendAction | "toggle" | "select" | — |
legend | boolean | — |
emptyLabel | string | — |
ref | Ref<HTMLElement> | — |
className | string | — |