# @salmonui/charts/pie-chart API reference

> 23 exported symbols of @salmonui/charts/pie-chart: 2 components, 1 function, 14 interfaces and 6 types.

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

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

## Components

### FunnelChart

Kind: component

Page: https://salmonui.dev/docs/reference/charts/pie-chart/FunnelChart

```ts
function FunnelChart(props: FunnelChartProps): ReactNode;
```

Props: [`FunnelChartProps`](https://salmonui.dev/docs/reference/charts/pie-chart/FunnelChartProps) (its members are the props)

### PieChart

Kind: component

Page: https://salmonui.dev/docs/reference/charts/pie-chart/PieChart

```ts
function PieChart(props: PieChartProps): ReactNode;
```

Props: [`PieChartProps`](https://salmonui.dev/docs/reference/charts/pie-chart/PieChartProps) (its members are the props)

## Interfaces

### AccumulationAnnotation

Kind: interface

Page: https://salmonui.dev/docs/reference/charts/pie-chart/AccumulationAnnotation

```ts
interface AccumulationAnnotation {
    readonly x: number | string;
    readonly y: number | string;
    readonly content: ReactNode;
}
```

Members (3):

| Name | Signature | Flags | Description |
| --- | --- | --- | --- |
| `x` | `readonly x: number \| string;` |  | Drawing px or a percent of the width / height (`'50%'`). |
| `y` | `readonly y: number \| string;` |  |  |
| `content` | `readonly content: ReactNode;` |  |  |

### AccumulationBaseProps

Kind: interface

Page: https://salmonui.dev/docs/reference/charts/pie-chart/AccumulationBaseProps

```ts
interface AccumulationBaseProps {
    readonly data?: readonly unknown[] | undefined;
    readonly valueField?: string | undefined;
    readonly labelField?: string | undefined;
    readonly colorField?: string | undefined;
    readonly palette?: readonly string[] | undefined;
    readonly patterns?: boolean | undefined;
    readonly emptyPoints?: 'drop' | 'zero' | 'average' | undefined;
    readonly width?: number | undefined;
    readonly height?: number | undefined;
    readonly title?: string | undefined;
    readonly subtitle?: string | undefined;
    readonly description?: string | undefined;
    readonly locale?: string | undefined;
    readonly format?: Intl.NumberFormatOptions | ((value: number) => string) | undefined;
    readonly legend?: boolean | AccumulationLegendOptions | undefined;
    readonly tooltip?: boolean | AccumulationTooltipOptions | undefined;
    readonly highlight?: boolean | undefined;
    readonly selection?: boolean | {
        readonly multiple?: boolean | undefined;
    } | undefined;
    readonly hiddenPoints?: readonly number[] | undefined;
    readonly defaultHiddenPoints?: readonly number[] | undefined;
    readonly onHiddenPointsChange?: ((hidden: readonly number[], event: AccumulationChangeEvent) => void) | undefined;
    readonly selectedPoints?: readonly AccumulationPointRef[] | undefined;
    readonly defaultSelectedPoints?: readonly AccumulationPointRef[] | undefined;
    readonly onSelectedPointsChange?: ((selected: readonly AccumulationPointRef[], event: AccumulationChangeEvent) => void) | undefined;
    readonly annotations?: readonly AccumulationAnnotation[] | undefined;
    readonly getPointStyle?: ((point: AccumulationPoint) => AccumulationPointStyle | undefined) | undefined;
    readonly formatLabel?: ((point: AccumulationPoint) => string) | undefined;
    readonly onPointClick?: ((point: AccumulationPoint, event: AccumulationChangeEvent) => void) | undefined;
    readonly onPointHover?: ((point: AccumulationPoint | null) => void) | undefined;
    readonly showDataTable?: boolean | undefined;
    readonly accessibleTable?: boolean | undefined;
    readonly renderEmpty?: (() => ReactNode) | undefined;
    readonly className?: string | undefined;
    readonly style?: CSSProperties | undefined;
    readonly id?: string | undefined;
    readonly ref?: Ref<AccumulationApi> | undefined;
    readonly onResize?: ((size: {
        readonly width: number;
        readonly height: number;
    }) => void) | undefined;
    readonly animated?: boolean | undefined;
}
```

Members (38):

| Name | Signature | Flags | Description |
| --- | --- | --- | --- |
| `data` | `readonly data?: readonly unknown[] \| undefined;` | optional | Records, or numbers (labels then default to "1", "2", ...). |
| `valueField` | `readonly valueField?: string \| undefined;` | optional |  |
| `labelField` | `readonly labelField?: string \| undefined;` | optional |  |
| `colorField` | `readonly colorField?: string \| undefined;` | optional | Record field holding a data color (`pointColorMapping`). |
| `palette` | `readonly palette?: readonly string[] \| undefined;` | optional | Data colors by point index; default the derived `--salmon-chart-*` palette. |
| `patterns` | `readonly patterns?: boolean \| undefined;` | optional | Overlay one system fill pattern per palette slot (non-color encoding). |
| `emptyPoints` | `readonly emptyPoints?: 'drop' \| 'zero' \| 'average' \| undefined;` | optional |  |
| `width` | `readonly width?: number \| undefined;` | optional |  |
| `height` | `readonly height?: number \| undefined;` | optional |  |
| `title` | `readonly title?: string \| undefined;` | optional |  |
| `subtitle` | `readonly subtitle?: string \| undefined;` | optional |  |
| `description` | `readonly description?: string \| undefined;` | optional | Accessible description; default the automatic summary. |
| `locale` | `readonly locale?: string \| undefined;` | optional |  |
| `format` | `readonly format?: Intl.NumberFormatOptions \| ((value: number) => string) \| undefined;` | optional |  |
| `legend` | `readonly legend?: boolean \| AccumulationLegendOptions \| undefined;` | optional |  |
| `tooltip` | `readonly tooltip?: boolean \| AccumulationTooltipOptions \| undefined;` | optional |  |
| `highlight` | `readonly highlight?: boolean \| undefined;` | optional | Dim the other points while one is hovered or focused. Default true. |
| `selection` | `readonly selection?: boolean \| {     readonly multiple?: boolean \| undefined; } \| undefined;` | optional | Click and Enter select points. |
| `hiddenPoints` | `readonly hiddenPoints?: readonly number[] \| undefined;` | optional |  |
| `defaultHiddenPoints` | `readonly defaultHiddenPoints?: readonly number[] \| undefined;` | optional |  |
| `onHiddenPointsChange` | `readonly onHiddenPointsChange?: ((hidden: readonly number[], event: AccumulationChangeEvent) => void) \| undefined;` | optional |  |
| `selectedPoints` | `readonly selectedPoints?: readonly AccumulationPointRef[] \| undefined;` | optional |  |
| `defaultSelectedPoints` | `readonly defaultSelectedPoints?: readonly AccumulationPointRef[] \| undefined;` | optional |  |
| `onSelectedPointsChange` | `readonly onSelectedPointsChange?: ((selected: readonly AccumulationPointRef[], event: AccumulationChangeEvent) => void) \| undefined;` | optional |  |
| `annotations` | `readonly annotations?: readonly AccumulationAnnotation[] \| undefined;` | optional |  |
| `getPointStyle` | `readonly getPointStyle?: ((point: AccumulationPoint) => AccumulationPointStyle \| undefined) \| undefined;` | optional |  |
| `formatLabel` | `readonly formatLabel?: ((point: AccumulationPoint) => string) \| undefined;` | optional |  |
| `onPointClick` | `readonly onPointClick?: ((point: AccumulationPoint, event: AccumulationChangeEvent) => void) \| undefined;` | optional |  |
| `onPointHover` | `readonly onPointHover?: ((point: AccumulationPoint \| null) => void) \| undefined;` | optional |  |
| `showDataTable` | `readonly showDataTable?: boolean \| undefined;` | optional | Visible accessible data table (`showDataTable`). |
| `accessibleTable` | `readonly accessibleTable?: boolean \| undefined;` | optional | `false` leaves the visually hidden data table out. |
| `renderEmpty` | `readonly renderEmpty?: (() => ReactNode) \| undefined;` | optional |  |
| `className` | `readonly className?: string \| undefined;` | optional |  |
| `style` | `readonly style?: CSSProperties \| undefined;` | optional |  |
| `id` | `readonly id?: string \| undefined;` | optional |  |
| `ref` | `readonly ref?: Ref<AccumulationApi> \| undefined;` | optional |  |
| `onResize` | `readonly onResize?: ((size: {     readonly width: number;     readonly height: number; }) => void) \| undefined;` | optional |  |
| `animated` | `readonly animated?: boolean \| undefined;` | optional | 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`. |

### AccumulationExportOptions

Kind: interface

Page: https://salmonui.dev/docs/reference/charts/pie-chart/AccumulationExportOptions

```ts
interface VizExportOptions {
    readonly format?: ImageFormat | 'csv' | undefined;
    readonly fileName?: string | undefined;
    readonly scale?: number | undefined;
    readonly escapeFormulas?: boolean | undefined;
}
```

Members (4):

| Name | Signature | Flags | Description |
| --- | --- | --- | --- |
| `format` | `readonly format?: ImageFormat \| 'csv' \| undefined;` | optional |  |
| `fileName` | `readonly fileName?: string \| undefined;` | optional |  |
| `scale` | `readonly scale?: number \| undefined;` | optional | Raster scale on top of the device pixel ratio. |
| `escapeFormulas` | `readonly escapeFormulas?: boolean \| undefined;` | optional | CSV: neutralize spreadsheet formulas in text cells. Default true; `false` writes raw text. |

### AccumulationLegendOptions

Kind: interface

Page: https://salmonui.dev/docs/reference/charts/pie-chart/AccumulationLegendOptions

```ts
interface AccumulationLegendOptions {
    readonly position?: 'top' | 'bottom' | 'start' | 'end' | undefined;
    readonly title?: string | undefined;
    readonly toggle?: boolean | undefined;
}
```

Members (3):

| Name | Signature | Flags | Description |
| --- | --- | --- | --- |
| `position` | `readonly position?: 'top' \| 'bottom' \| 'start' \| 'end' \| undefined;` | optional |  |
| `title` | `readonly title?: string \| undefined;` | optional |  |
| `toggle` | `readonly toggle?: boolean \| undefined;` | optional | Clicking a legend item hides its points (`hiddenPoints`). Default true. |

### AccumulationPoint

Kind: interface

Page: https://salmonui.dev/docs/reference/charts/pie-chart/AccumulationPoint

```ts
interface AccumulationPoint {
    readonly series: number;
    readonly index: number;
    readonly label: string;
    readonly value: number;
    readonly fraction: number;
    readonly color: string;
    readonly datum: unknown;
}
```

Members (7):

| Name | Signature | Flags | Description |
| --- | --- | --- | --- |
| `series` | `readonly series: number;` |  | Ring (series) index; 0 without `series`. |
| `index` | `readonly index: number;` |  | Index in the series data (`-1` for the grouped "Others" slice). |
| `label` | `readonly label: string;` |  |  |
| `value` | `readonly value: number;` |  |  |
| `fraction` | `readonly fraction: number;` |  | Share of the visible total of its ring, 0..1. |
| `color` | `readonly color: string;` |  |  |
| `datum` | `readonly datum: unknown;` |  | The record, or null for "Others". |

### AccumulationPointRef

Kind: interface

Page: https://salmonui.dev/docs/reference/charts/pie-chart/AccumulationPointRef

```ts
interface AccumulationPointRef {
    readonly series: number;
    readonly index: number;
}
```

Members (2):

| Name | Signature | Flags | Description |
| --- | --- | --- | --- |
| `series` | `readonly series: number;` |  |  |
| `index` | `readonly index: number;` |  |  |

### AccumulationPointStyle

Kind: interface

Page: https://salmonui.dev/docs/reference/charts/pie-chart/AccumulationPointStyle

```ts
interface AccumulationPointStyle {
    readonly color?: string | undefined;
}
```

Members (1):

| Name | Signature | Flags | Description |
| --- | --- | --- | --- |
| `color` | `readonly color?: string \| undefined;` | optional | Data color. |

### AccumulationSeries

Kind: interface

Page: https://salmonui.dev/docs/reference/charts/pie-chart/AccumulationSeries

```ts
interface AccumulationSeries {
    readonly data?: readonly unknown[] | undefined;
    readonly valueField?: string | undefined;
    readonly labelField?: string | undefined;
    readonly name?: string | undefined;
}
```

Members (4):

| Name | Signature | Flags | Description |
| --- | --- | --- | --- |
| `data` | `readonly data?: readonly unknown[] \| undefined;` | optional |  |
| `valueField` | `readonly valueField?: string \| undefined;` | optional |  |
| `labelField` | `readonly labelField?: string \| undefined;` | optional |  |
| `name` | `readonly name?: string \| undefined;` | optional |  |

### AccumulationTooltipOptions

Kind: interface

Page: https://salmonui.dev/docs/reference/charts/pie-chart/AccumulationTooltipOptions

```ts
interface AccumulationTooltipOptions {
    readonly format?: ((point: AccumulationPoint) => string) | undefined;
    readonly render?: ((point: AccumulationPoint) => ReactNode) | undefined;
}
```

Members (2):

| Name | Signature | Flags | Description |
| --- | --- | --- | --- |
| `format` | `readonly format?: ((point: AccumulationPoint) => string) \| undefined;` | optional |  |
| `render` | `readonly render?: ((point: AccumulationPoint) => ReactNode) \| undefined;` | optional |  |

### FunnelChartProps

Kind: interface

Page: https://salmonui.dev/docs/reference/charts/pie-chart/FunnelChartProps

```ts
interface FunnelChartProps extends AccumulationBaseProps {
    readonly text?: Partial<FunnelChartText> | undefined;
    readonly shape?: 'funnel' | 'pyramid' | undefined;
    readonly neckWidth?: number | string | undefined;
    readonly neckHeight?: number | string | undefined;
    readonly gap?: number | undefined;
    readonly variant?: 'standard' | 'trapezoidal' | undefined;
    readonly mode?: 'linear' | 'area' | undefined;
    readonly labels?: boolean | {
        readonly position?: 'inside' | 'outside' | undefined;
    } | undefined;
}
```

Members (46):

| Name | Signature | Flags | Description |
| --- | --- | --- | --- |
| `text` | `readonly text?: Partial<FunnelChartText> \| undefined;` | optional | Built-in text (over the nearest `LocaleProvider`'s `funnelChart` entry). |
| `shape` | `readonly shape?: 'funnel' \| 'pyramid' \| undefined;` | optional |  |
| `neckWidth` | `readonly neckWidth?: number \| string \| undefined;` | optional | Funnel neck size, px or a percent of the width / height. Defaults `'20%'`. |
| `neckHeight` | `readonly neckHeight?: number \| string \| undefined;` | optional |  |
| `gap` | `readonly gap?: number \| undefined;` | optional | Gap between segments, px. Default 2 (10 with `variant="trapezoidal"`). |
| `variant` | `readonly variant?: 'standard' \| 'trapezoidal' \| undefined;` | optional | Funnel drawing: `standard` (default) is a cone with a neck; `trapezoidal` draws equal-height bars as wide as value / max, joined by translucent trapezoids, and ignores the neck. Funnel only. |
| `mode` | `readonly mode?: 'linear' \| 'area' \| undefined;` | optional | Pyramid `linear` (height by value) or `area` (area by value). |
| `labels` | `readonly labels?: boolean \| {     readonly position?: 'inside' \| 'outside' \| undefined; } \| undefined;` | optional | Segment labels: inside (default) or outside to the end side, or none. |
| `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`. |

### FunnelChartText

Kind: interface

Page: https://salmonui.dev/docs/reference/charts/pie-chart/FunnelChartText

```ts
interface FunnelChartText {
    readonly funnelChart: string;
    readonly pyramidChart: string;
    readonly legend: string;
}
```

Built-in text of a FunnelChart (`text` prop; the `funnelChart` entry of a `LocaleProvider` catalog).

Members (3):

| Name | Signature | Flags | Description |
| --- | --- | --- | --- |
| `funnelChart` | `readonly funnelChart: string;` |  | Kind named in the role description, the summary and the default name. |
| `pyramidChart` | `readonly pyramidChart: string;` |  | The kind with `shape="pyramid"`. |
| `legend` | `readonly legend: string;` |  |  |

### PieChartProps

Kind: interface

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

```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`. |

### PieChartText

Kind: interface

Page: https://salmonui.dev/docs/reference/charts/pie-chart/PieChartText

```ts
interface PieChartText {
    readonly pieChart: string;
    readonly doughnutChart: string;
    readonly others: string;
    readonly legend: string;
}
```

Built-in text of a PieChart (`text` prop; the `pieChart` entry of a `LocaleProvider` catalog).

Members (4):

| Name | Signature | Flags | Description |
| --- | --- | --- | --- |
| `pieChart` | `readonly pieChart: string;` |  | Kind named in the role description, the summary and the default name. |
| `doughnutChart` | `readonly doughnutChart: string;` |  | The kind with `innerRadius`. |
| `others` | `readonly others: string;` |  | Label of the `groupSmall` slice. |
| `legend` | `readonly legend: string;` |  |  |

## Types

### AccumulationApi

Kind: type

Page: https://salmonui.dev/docs/reference/charts/pie-chart/AccumulationApi

```ts
type AccumulationApi = VizInstance;
```

Instance passed to `ref`.

Members (7):

| Name | Signature | Flags | Description |
| --- | --- | --- | --- |
| `element` | `element: HTMLElement \| null;` | inherited | The root `<figure>` (null before mount). |
| `export` | `export: (options?: VizExportOptions \| undefined) => Promise<void>;` | inherited | Downloads the visualization; settles after the download starts. |
| `toBlob` | `toBlob: (format?: ImageFormat \| undefined) => Promise<Blob>;` | inherited |  |
| `toDataURL` | `toDataURL: (format?: ImageFormat \| undefined) => Promise<string>;` | inherited |  |
| `toSVGString` | `toSVGString: () => string;` | inherited | The drawn SVG markup with `xmlns`, synchronously; theme colors stay `var(--salmon-*)` references. `toBlob('svg')` is the standalone file with colors resolved. Empty before mount. |
| `print` | `print: () => Promise<void>;` | inherited |  |
| `focus` | `focus: () => void;` | inherited | Focuses the plot (the one tab stop). |

### AccumulationChangeEvent

Kind: type

Page: https://salmonui.dev/docs/reference/charts/pie-chart/AccumulationChangeEvent

```ts
type AccumulationChangeEvent = VizChangeEvent<'click' | 'legend' | 'keyboard'>;
```

Members (2):

| Name | Signature | Flags | Description |
| --- | --- | --- | --- |
| `source` | `source: VizChangeSource;` | inherited |  |
| `reason` | `reason: "click" \| "keyboard" \| "legend";` | inherited |  |

### FunnelChartApi

Kind: type

Page: https://salmonui.dev/docs/reference/charts/pie-chart/FunnelChartApi

```ts
type FunnelChartApi = AccumulationApi;
```

Members (7):

| Name | Signature | Flags | Description |
| --- | --- | --- | --- |
| `element` | `element: HTMLElement \| null;` | inherited | The root `<figure>` (null before mount). |
| `export` | `export: (options?: VizExportOptions \| undefined) => Promise<void>;` | inherited | Downloads the visualization; settles after the download starts. |
| `toBlob` | `toBlob: (format?: ImageFormat \| undefined) => Promise<Blob>;` | inherited |  |
| `toDataURL` | `toDataURL: (format?: ImageFormat \| undefined) => Promise<string>;` | inherited |  |
| `toSVGString` | `toSVGString: () => string;` | inherited | The drawn SVG markup with `xmlns`, synchronously; theme colors stay `var(--salmon-*)` references. `toBlob('svg')` is the standalone file with colors resolved. Empty before mount. |
| `print` | `print: () => Promise<void>;` | inherited |  |
| `focus` | `focus: () => void;` | inherited | Focuses the plot (the one tab stop). |

### PieChartApi

Kind: type

Page: https://salmonui.dev/docs/reference/charts/pie-chart/PieChartApi

```ts
type PieChartApi = AccumulationApi;
```

Members (7):

| Name | Signature | Flags | Description |
| --- | --- | --- | --- |
| `element` | `element: HTMLElement \| null;` | inherited | The root `<figure>` (null before mount). |
| `export` | `export: (options?: VizExportOptions \| undefined) => Promise<void>;` | inherited | Downloads the visualization; settles after the download starts. |
| `toBlob` | `toBlob: (format?: ImageFormat \| undefined) => Promise<Blob>;` | inherited |  |
| `toDataURL` | `toDataURL: (format?: ImageFormat \| undefined) => Promise<string>;` | inherited |  |
| `toSVGString` | `toSVGString: () => string;` | inherited | The drawn SVG markup with `xmlns`, synchronously; theme colors stay `var(--salmon-*)` references. `toBlob('svg')` is the standalone file with colors resolved. Empty before mount. |
| `print` | `print: () => Promise<void>;` | inherited |  |
| `focus` | `focus: () => void;` | inherited | Focuses the plot (the one tab stop). |

### PieLabelPosition

Kind: type

Page: https://salmonui.dev/docs/reference/charts/pie-chart/PieLabelPosition

```ts
type PieLabelPosition = 'inside' | 'outside' | 'auto';
```

## Re-exported entry points

- [@salmonui/charts/chart/export](https://salmonui.dev/docs/reference/charts/chart-export.md): 3 symbols: 1 function, 1 interface and 1 type
  `ExportVisualizationsOptions`, `ExportableVisualization`, `exportVisualizations`
