PitchKit
API Reference@pitchkit/reactInterfaces

PizzaChartProps

Defined in: packages/react/src/pizza-types.ts:80

Properties

PropertyModifierTypeDescriptionDefined in
appearance?readonlyPizzaAppearance-packages/react/src/pizza-types.ts:110
aspectRatio?readonlynumberShape of the responsive box. Default 1packages/react/src/pizza-types.ts:109
children?readonlyReactNodeAnnotations, positioned through usePizzaChart().packages/react/src/pizza-types.ts:113
className?readonlystring-packages/react/src/pizza-types.ts:111
format?readonly(value, metric) => stringText for values. Defaults to at most two decimals.packages/react/src/pizza-types.ts:95
groups?readonlyReadonly<Record<string, PizzaGroup>>Colours for groups, by group name.packages/react/src/pizza-types.ts:91
height?readonlynumber-packages/react/src/pizza-types.ts:107
labelRotation?readonlyLabelRotationHow metric labels sit around the rim. Default "tangent"packages/react/src/pizza-types.ts:93
metricsreadonlyreadonly 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) => ReactNodeMakes 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?readonlyPizzaSelection | nullControlled selection; null shows the chart. Omit for uncontrolled.packages/react/src/pizza-types.ts:102
seriesreadonlyreadonly 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?readonlyPizzaSeriesLayoutHow several series share a slice. Default "side-by-side"packages/react/src/pizza-types.ts:89
width?readonlynumberFixed pixel size — the opt-out from the responsive default. Provide both, or neither.packages/react/src/pizza-types.ts:106

On this page