# PieChartProps (@salmonui/charts/pie-chart)

> The PieChartProps interface of @salmonui/charts/pie-chart.

Canonical: https://salmonui.dev/docs/reference/charts/pie-chart/PieChartProps

```ts
import type { PieChartProps } from '@salmonui/charts/pie-chart';
```

Entry index: https://salmonui.dev/docs/reference/charts/pie-chart (Markdown with every symbol of the entry: https://salmonui.dev/docs/reference/charts/pie-chart.md).

## Reference

Kind: interface

```ts
interface PieChartProps extends AccumulationBaseProps {
    readonly text?: Partial<PieChartText> | undefined;
    readonly series?: readonly AccumulationSeries[] | undefined;
    readonly radius?: number | string | undefined;
    readonly innerRadius?: number | string | undefined;
    readonly center?: {
        readonly x?: number | string | undefined;
        readonly y?: number | string | undefined;
    } | undefined;
    readonly startAngle?: number | undefined;
    readonly endAngle?: number | undefined;
    readonly padAngle?: number | undefined;
    readonly explode?: boolean | {
        readonly offset?: number | undefined;
        readonly all?: boolean | undefined;
    } | undefined;
    readonly explodedPoints?: readonly number[] | undefined;
    readonly defaultExplodedPoints?: readonly number[] | undefined;
    readonly onExplodedPointsChange?: ((exploded: readonly number[], event: AccumulationChangeEvent) => void) | undefined;
    readonly groupSmall?: {
        readonly threshold: number;
        readonly by?: 'value' | 'count' | undefined;
        readonly label?: string | undefined;
    } | undefined;
    readonly labels?: boolean | {
        readonly position?: PieLabelPosition | undefined;
        readonly connector?: 'line' | 'curve' | undefined;
        readonly maxWidth?: number | undefined;
    } | undefined;
    readonly centerLabel?: ReactNode | ((context: {
        readonly point: AccumulationPoint | null;
        readonly total: number;
    }) => ReactNode);
    readonly size?: 'small' | 'default' | undefined;
}
```

Members (54):

| Name | Signature | Flags | Description |
| --- | --- | --- | --- |
| `text` | `readonly text?: Partial<PieChartText> \| undefined;` | optional | Built-in text (over the nearest `LocaleProvider`'s `pieChart` entry). |
| `series` | `readonly series?: readonly AccumulationSeries[] \| undefined;` | optional | Concentric rings, inner to outer; overrides `data` / `valueField` / `labelField`. |
| `radius` | `readonly radius?: number \| string \| undefined;` | optional | Outer radius: px or a percent of the half of the shorter side (`'80%'`). Default `'80%'`. |
| `innerRadius` | `readonly innerRadius?: number \| string \| undefined;` | optional | Doughnut hole: px, or a percent of the radius (`'50%'`). Default 0. |
| `center` | `readonly center?: {     readonly x?: number \| string \| undefined;     readonly y?: number \| string \| undefined; } \| undefined;` | optional | Center as percents of the plot (`{ x: '50%', y: '50%' }`) or px. |
| `startAngle` | `readonly startAngle?: number \| undefined;` | optional | Degrees clockwise from 12 o'clock. Default 0 and 360. |
| `endAngle` | `readonly endAngle?: number \| undefined;` | optional |  |
| `padAngle` | `readonly padAngle?: number \| undefined;` | optional | Gap between slices, degrees. |
| `explode` | `readonly explode?: boolean \| {     readonly offset?: number \| undefined;     readonly all?: boolean \| undefined; } \| undefined;` | optional | Explosion: offset px (default 10) and `all`; click toggles when set. |
| `explodedPoints` | `readonly explodedPoints?: readonly number[] \| undefined;` | optional |  |
| `defaultExplodedPoints` | `readonly defaultExplodedPoints?: readonly number[] \| undefined;` | optional |  |
| `onExplodedPointsChange` | `readonly onExplodedPointsChange?: ((exploded: readonly number[], event: AccumulationChangeEvent) => void) \| undefined;` | optional |  |
| `groupSmall` | `readonly groupSmall?: {     readonly threshold: number;     readonly by?: 'value' \| 'count' \| undefined;     readonly label?: string \| undefined; } \| undefined;` | optional | Merge small slices into one "Others" slice. |
| `labels` | `readonly labels?: boolean \| {     readonly position?: PieLabelPosition \| undefined;     readonly connector?: 'line' \| 'curve' \| undefined;     readonly maxWidth?: number \| undefined; } \| undefined;` | optional |  |
| `centerLabel` | `readonly centerLabel?: ReactNode \| ((context: {     readonly point: AccumulationPoint \| null;     readonly total: number; }) => ReactNode);` | optional | Doughnut center content; a function receives the hovered or focused point (null at rest). |
| `size` | `readonly size?: 'small' \| 'default' \| undefined;` | optional | `small`: no legend, no labels, no title (the pie sparkline). |
| `data` | `data?: readonly unknown[];` | optional, inherited | Records, or numbers (labels then default to "1", "2", ...). |
| `valueField` | `valueField?: string;` | optional, inherited |  |
| `labelField` | `labelField?: string;` | optional, inherited |  |
| `colorField` | `colorField?: string;` | optional, inherited | Record field holding a data color (`pointColorMapping`). |
| `palette` | `palette?: readonly string[];` | optional, inherited | Data colors by point index; default the derived `--salmon-chart-*` palette. |
| `patterns` | `patterns?: boolean;` | optional, inherited | Overlay one system fill pattern per palette slot (non-color encoding). |
| `emptyPoints` | `emptyPoints?: "average" \| "drop" \| "zero";` | optional, inherited |  |
| `width` | `width?: number;` | optional, inherited |  |
| `height` | `height?: number;` | optional, inherited |  |
| `title` | `title?: string;` | optional, inherited |  |
| `subtitle` | `subtitle?: string;` | optional, inherited |  |
| `description` | `description?: string;` | optional, inherited | Accessible description; default the automatic summary. |
| `locale` | `locale?: string;` | optional, inherited |  |
| `format` | `format?: NumberFormatOptions \| ((value: number) => string);` | optional, inherited |  |
| `legend` | `legend?: boolean \| AccumulationLegendOptions;` | optional, inherited |  |
| `tooltip` | `tooltip?: boolean \| AccumulationTooltipOptions;` | optional, inherited |  |
| `highlight` | `highlight?: boolean;` | optional, inherited | Dim the other points while one is hovered or focused. Default true. |
| `selection` | `selection?: boolean \| { readonly multiple?: boolean \| undefined; };` | optional, inherited | Click and Enter select points. |
| `hiddenPoints` | `hiddenPoints?: readonly number[];` | optional, inherited |  |
| `defaultHiddenPoints` | `defaultHiddenPoints?: readonly number[];` | optional, inherited |  |
| `onHiddenPointsChange` | `onHiddenPointsChange?: ((hidden: readonly number[], event: AccumulationChangeEvent) => void);` | optional, inherited |  |
| `selectedPoints` | `selectedPoints?: readonly AccumulationPointRef[];` | optional, inherited |  |
| `defaultSelectedPoints` | `defaultSelectedPoints?: readonly AccumulationPointRef[];` | optional, inherited |  |
| `onSelectedPointsChange` | `onSelectedPointsChange?: ((selected: readonly AccumulationPointRef[], event: AccumulationChangeEvent) => void);` | optional, inherited |  |
| `annotations` | `annotations?: readonly AccumulationAnnotation[];` | optional, inherited |  |
| `getPointStyle` | `getPointStyle?: ((point: AccumulationPoint) => AccumulationPointStyle \| undefined);` | optional, inherited |  |
| `formatLabel` | `formatLabel?: ((point: AccumulationPoint) => string);` | optional, inherited |  |
| `onPointClick` | `onPointClick?: ((point: AccumulationPoint, event: AccumulationChangeEvent) => void);` | optional, inherited |  |
| `onPointHover` | `onPointHover?: ((point: AccumulationPoint \| null) => void);` | optional, inherited |  |
| `showDataTable` | `showDataTable?: boolean;` | optional, inherited | Visible accessible data table (`showDataTable`). |
| `accessibleTable` | `accessibleTable?: boolean;` | optional, inherited | `false` leaves the visually hidden data table out. |
| `renderEmpty` | `renderEmpty?: (() => ReactNode);` | optional, inherited |  |
| `className` | `className?: string;` | optional, inherited |  |
| `style` | `style?: CSSProperties;` | optional, inherited |  |
| `id` | `id?: string;` | optional, inherited |  |
| `ref` | `ref?: Ref<VizInstance>;` | optional, inherited |  |
| `onResize` | `onResize?: ((size: { readonly width: number; readonly height: number; }) => void);` | optional, inherited |  |
| `animated` | `animated?: boolean;` | optional, inherited | Entrance and update transitions, default `true`: client only (never in server markup), off under `prefers-reduced-motion`. The CSS is the opt-in `@salmonui/charts/viz-animations.css`. |
