label | LocalizedMessage | — | Accessible name of the chart. It names the plot and captions the data table that assistive technology reads. The
chart paints no heading; render one beside it if the screen needs one. |
slices | readonly PieChartSlice[] | — | The slices, in the order callbacks report as index. They run clockwise from the top (mirrored in right-to-left). |
className | string | — | Classes appended after the generated classes. Put overrides in @layer chroma.overrides. |
cutout | `${number}%` | — | Size of the hole as a share of the radius: "60%" is a donut, "0%" a full pie. Defaults to "0%". |
defaultHiddenSlices | readonly number[] | — | Initial hidden slice positions when uncontrolled. |
description | LocalizedMessage | — | Longer description of the chart, read after its name: what it shows, or how to explore it with a keyboard. |
formatLegendEntry | ((entry: PieChartLegendEntry) => ChartText) | — | Formats one legend entry, the whole text beside the swatch. Defaults to the slice label and its share, for example
Fire (25%): a whole percentage when it is whole, otherwise one decimal, in the locale's own digits. |
formatTooltipRow | ((row: PieChartLegendEntry) => ChartText) | — | Formats one tooltip row, the whole text beside the swatch. Defaults to the formatted value and the share. |
formatTooltipTitle | ((index: number, label: ChartText) => ChartText) | — | Formats the tooltip heading from the slice position and its label. Defaults to the slice label. |
formatValue | ((value: number) => ChartText) | — | Formats a value for axis ticks, end labels, tooltip rows and the data table. Defaults to the runtime locale's
decimal format. Return toDisplayValue(...) for data, or a LocalizedMessage when the text carries a unit word. |
hiddenSlices | readonly number[] | — | Controlled list of hidden slice positions. Pair with onHiddenSlicesChange. |
id | string | — | Id of the root element. |
legendPosition | ChartLegendPosition | — | Legend edge. Defaults to {@link ChartLegendPosition.Top}. |
locale | string | — | BCP 47 locale for the default value format. Defaults to the runtime locale. |
onHiddenSlicesChange | ((hiddenSlices: readonly number[], details: ChangeDetails<ChangeReason>) => void) | — | Called with the next list of hidden slice positions when a legend entry is pressed, before it applies.
details.cancel() keeps the current list. |
palette | ChartPaletteInput | — | Series colors. Defaults to {@link ChartPalette.Categorical}. After the last color the order repeats. |
ref | Ref<HTMLDivElement> | — | Ref to the root element. |
showLegend | boolean | — | Paints a legend whose entries are buttons that show or hide a series or slice. Defaults to false. |
showTooltip | boolean | — | Shows the tooltip on hover and keyboard focus. Defaults to true. |
sliceGap | number | — | Gap between neighboring slices in pixels, at any chart size. 0 removes it. Defaults to 4. |