PizzaChartProps
Defined in: packages/react/src/pizza-types.ts:80
Properties
| Property | Modifier | Type | Description | Defined in |
|---|---|---|---|---|
appearance? | readonly | PizzaAppearance | - | packages/react/src/pizza-types.ts:110 |
aspectRatio? | readonly | number | Shape of the responsive box. Default 1 | packages/react/src/pizza-types.ts:109 |
children? | readonly | ReactNode | Annotations, positioned through usePizzaChart(). | packages/react/src/pizza-types.ts:113 |
className? | readonly | string | - | packages/react/src/pizza-types.ts:111 |
format? | readonly | (value, metric) => string | Text for values. Defaults to at most two decimals. | packages/react/src/pizza-types.ts:95 |
groups? | readonly | Readonly<Record<string, PizzaGroup>> | Colours for groups, by group name. | packages/react/src/pizza-types.ts:91 |
height? | readonly | number | - | packages/react/src/pizza-types.ts:107 |
labelRotation? | readonly | LabelRotation | How metric labels sit around the rim. Default "tangent" | packages/react/src/pizza-types.ts:93 |
metrics | readonly | readonly PizzaMetric[] | The slices, clockwise from the top. | packages/react/src/pizza-types.ts:82 |
onSelectedChange? | readonly | (selection) => void | - | packages/react/src/pizza-types.ts:103 |
renderDetail? | readonly | (context) => ReactNode | Makes slices clickable: activating one replaces the chart with what this returns, with a Back button. Without it nothing is clickable. | packages/react/src/pizza-types.ts:100 |
selected? | readonly | PizzaSelection | null | Controlled selection; null shows the chart. Omit for uncontrolled. | packages/react/src/pizza-types.ts:102 |
series | readonly | readonly PizzaSeries[] | One slice per series per metric. Readable up to three side by side, or two overlaid; more draws, with a development warning. | packages/react/src/pizza-types.ts:87 |
seriesLayout? | readonly | PizzaSeriesLayout | How several series share a slice. Default "side-by-side" | packages/react/src/pizza-types.ts:89 |
width? | readonly | number | Fixed pixel size — the opt-out from the responsive default. Provide both, or neither. | packages/react/src/pizza-types.ts:106 |