# ChartProps (@salmonui/charts/chart)

> The ChartProps interface of @salmonui/charts/chart.

Canonical: https://salmonui.dev/docs/reference/charts/chart/ChartProps

```ts
import type { ChartProps } from '@salmonui/charts/chart';
```

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

## Reference

Kind: interface

```ts
interface ChartProps extends ChartRootHandlers {
    readonly 'aria-label'?: string | undefined;
    readonly 'aria-labelledby'?: string | undefined;
    readonly data?: readonly ChartDatum[] | undefined;
    readonly series?: readonly ChartSeriesOptions[] | undefined;
    readonly xAxis?: ChartAxisOptions | undefined;
    readonly yAxis?: ChartAxisOptions | undefined;
    readonly axes?: readonly (ChartAxisOptions & {
        readonly id: string;
        readonly direction: 'x' | 'y';
    })[] | undefined;
    readonly panes?: {
        readonly rows?: readonly ChartPaneSize[];
        readonly columns?: readonly ChartPaneSize[];
    } | undefined;
    readonly orientation?: 'vertical' | 'horizontal' | undefined;
    readonly coordinate?: 'cartesian' | 'polar' | 'radar' | undefined;
    readonly radius?: number | undefined;
    readonly features?: readonly ChartFeature[] | undefined;
    readonly grouping?: 'sideBySide' | 'overlap' | undefined;
    readonly title?: string | undefined;
    readonly subtitle?: string | undefined;
    readonly description?: string | undefined;
    readonly legend?: boolean | ChartLegendOptions | undefined;
    readonly tooltip?: boolean | ChartTooltipOptions | undefined;
    readonly crosshair?: boolean | ChartCrosshairOptions | undefined;
    readonly zoom?: boolean | ChartZoomOptions | undefined;
    readonly zoomRange?: ChartZoomRange | undefined;
    readonly defaultZoomRange?: ChartZoomRange | undefined;
    readonly onZoomRangeChange?: ((range: ChartZoomRange, event: ChartChangeEvent<'wheel' | 'selection' | 'pan' | 'pinch' | 'keyboard' | 'toolbar' | 'scrollbar' | 'reset'>) => void) | undefined;
    readonly onVisibleRangeChange?: ((change: {
        readonly axisId: string;
        readonly range: readonly [
            number,
            number
        ];
    }) => void) | undefined;
    readonly hiddenSeries?: readonly string[] | undefined;
    readonly defaultHiddenSeries?: readonly string[] | undefined;
    readonly onHiddenSeriesChange?: ((ids: readonly string[], event: ChartChangeEvent<'legend'>) => void) | undefined;
    readonly selection?: boolean | {
        readonly mode?: 'point' | 'series' | 'cluster' | 'range' | 'lasso';
        readonly multiple?: boolean;
        readonly axis?: 'x' | 'y' | 'xy';
    } | undefined;
    readonly onRangeSelect?: ((selection: {
        readonly ranges: ChartZoomRange;
        readonly points: readonly ChartPointRef[];
    }, event: ChartChangeEvent<'range' | 'lasso'>) => void) | undefined;
    readonly selectedPoints?: readonly ChartPointRef[] | undefined;
    readonly defaultSelectedPoints?: readonly ChartPointRef[] | undefined;
    readonly onSelectedPointsChange?: ((points: readonly ChartPointRef[], event: ChartChangeEvent<'click' | 'keyboard' | 'range' | 'lasso' | 'sync'>) => void) | undefined;
    readonly highlight?: 'series' | 'point' | 'cluster' | false | undefined;
    readonly onPointClick?: ((ctx: ChartPointContext, event: MouseEvent) => void) | undefined;
    readonly onPlotClick?: ((point: ChartPlotPoint, event: MouseEvent) => void) | undefined;
    readonly onPlotPointerMove?: ((point: ChartPlotPoint, event: PointerEvent) => void) | undefined;
    readonly onPointHover?: ((ctx: ChartPointContext | null) => void) | undefined;
    readonly onPointChange?: ((change: {
        readonly seriesId: string;
        readonly index: number;
        readonly value: number;
    }, event: ChartChangeEvent<'drag' | 'keyboard'>) => void) | undefined;
    readonly onPointDoubleClick?: ((ctx: ChartPointContext, event: MouseEvent) => void) | undefined;
    readonly onAxisLabelClick?: ((ctx: ChartAxisLabelContext, event: MouseEvent) => void) | undefined;
    readonly onAxisLabelGroupClick?: ((ctx: {
        readonly axisId: string;
        readonly group: number;
        readonly level: number;
        readonly label: string;
    }, event: MouseEvent) => void) | undefined;
    readonly onResize?: ((size: {
        readonly width: number;
        readonly height: number;
    }) => void) | undefined;
    readonly annotations?: readonly ChartAnnotation[] | undefined;
    readonly indicators?: readonly ChartIndicator[] | undefined;
    readonly stackLabels?: boolean | {
        readonly format?: ChartFormat | undefined;
    } | undefined;
    readonly palette?: readonly string[] | undefined;
    readonly colorRanges?: readonly ChartColorRange[] | undefined;
    readonly renderer?: 'svg' | 'canvas' | 'auto' | undefined;
    readonly decimation?: 'auto' | 'lttb' | 'minMax' | false | undefined;
    readonly accessibleTable?: boolean | undefined;
    readonly showDataTable?: boolean | undefined;
    readonly renderEmpty?: (() => ReactNode) | undefined;
    readonly animated?: boolean | undefined;
    readonly locale?: string | undefined;
    readonly timeZone?: string | undefined;
    readonly text?: Partial<ChartText> | undefined;
    readonly width?: number | undefined;
    readonly height?: number | undefined;
    readonly className?: string | undefined;
    readonly style?: CSSProperties | undefined;
    readonly exportWriters?: ChartExportWriters | undefined;
    readonly ref?: Ref<ChartApi> | undefined;
    readonly children?: ReactNode;
}
```

Members (63):

| Name | Signature | Flags | Description |
| --- | --- | --- | --- |
| `aria-label` | `readonly 'aria-label'?: string \| undefined;` | optional | Accessible name of the chart; wins over `title` and the generated summary. |
| `aria-labelledby` | `readonly 'aria-labelledby'?: string \| undefined;` | optional | Id of the element naming the chart; wins over `aria-label`. |
| `data` | `readonly data?: readonly ChartDatum[] \| undefined;` | optional |  |
| `series` | `readonly series?: readonly ChartSeriesOptions[] \| undefined;` | optional |  |
| `xAxis` | `readonly xAxis?: ChartAxisOptions \| undefined;` | optional |  |
| `yAxis` | `readonly yAxis?: ChartAxisOptions \| undefined;` | optional |  |
| `axes` | `readonly axes?: readonly (ChartAxisOptions & {     readonly id: string;     readonly direction: 'x' \| 'y'; })[] \| undefined;` | optional | Additional axes referenced by `series.xAxis` / `series.yAxis` (id required). |
| `panes` | `readonly panes?: {     readonly rows?: readonly ChartPaneSize[];     readonly columns?: readonly ChartPaneSize[]; } \| undefined;` | optional |  |
| `orientation` | `readonly orientation?: 'vertical' \| 'horizontal' \| undefined;` | optional |  |
| `coordinate` | `readonly coordinate?: 'cartesian' \| 'polar' \| 'radar' \| undefined;` | optional | Polar (circles) or radar (polygons) coordinates; x is the angle, y the radius. |
| `radius` | `readonly radius?: number \| undefined;` | optional | Polar radius as a fraction (0..1) of the largest circle that fits. |
| `features` | `readonly features?: readonly ChartFeature[] \| undefined;` | optional | Preloaded features from `@salmonui/charts/chart/features`: `polar` renders polar charts on the server. |
| `grouping` | `readonly grouping?: 'sideBySide' \| 'overlap' \| undefined;` | optional |  |
| `title` | `readonly title?: string \| undefined;` | optional |  |
| `subtitle` | `readonly subtitle?: string \| undefined;` | optional |  |
| `description` | `readonly description?: string \| undefined;` | optional |  |
| `legend` | `readonly legend?: boolean \| ChartLegendOptions \| undefined;` | optional |  |
| `tooltip` | `readonly tooltip?: boolean \| ChartTooltipOptions \| undefined;` | optional |  |
| `crosshair` | `readonly crosshair?: boolean \| ChartCrosshairOptions \| undefined;` | optional |  |
| `zoom` | `readonly zoom?: boolean \| ChartZoomOptions \| undefined;` | optional |  |
| `zoomRange` | `readonly zoomRange?: ChartZoomRange \| undefined;` | optional |  |
| `defaultZoomRange` | `readonly defaultZoomRange?: ChartZoomRange \| undefined;` | optional |  |
| `onZoomRangeChange` | `readonly onZoomRangeChange?: ((range: ChartZoomRange, event: ChartChangeEvent<'wheel' \| 'selection' \| 'pan' \| 'pinch' \| 'keyboard' \| 'toolbar' \| 'scrollbar' \| 'reset'>) => void) \| undefined;` | optional |  |
| `onVisibleRangeChange` | `readonly onVisibleRangeChange?: ((change: {     readonly axisId: string;     readonly range: readonly [         number,         number     ]; }) => void) \| undefined;` | optional | The committed visible range of a continuous axis changed: fetch data for it. Fires on commit, never per frame. |
| `hiddenSeries` | `readonly hiddenSeries?: readonly string[] \| undefined;` | optional |  |
| `defaultHiddenSeries` | `readonly defaultHiddenSeries?: readonly string[] \| undefined;` | optional |  |
| `onHiddenSeriesChange` | `readonly onHiddenSeriesChange?: ((ids: readonly string[], event: ChartChangeEvent<'legend'>) => void) \| undefined;` | optional |  |
| `selection` | `readonly selection?: boolean \| {     readonly mode?: 'point' \| 'series' \| 'cluster' \| 'range' \| 'lasso';     readonly multiple?: boolean;     readonly axis?: 'x' \| 'y' \| 'xy'; } \| undefined;` | optional |  |
| `onRangeSelect` | `readonly onRangeSelect?: ((selection: {     readonly ranges: ChartZoomRange;     readonly points: readonly ChartPointRef[]; }, event: ChartChangeEvent<'range' \| 'lasso'>) => void) \| undefined;` | optional | Range and lasso selection finished: `ranges` per axis id (range mode) and the enclosed points. |
| `selectedPoints` | `readonly selectedPoints?: readonly ChartPointRef[] \| undefined;` | optional |  |
| `defaultSelectedPoints` | `readonly defaultSelectedPoints?: readonly ChartPointRef[] \| undefined;` | optional |  |
| `onSelectedPointsChange` | `readonly onSelectedPointsChange?: ((points: readonly ChartPointRef[], event: ChartChangeEvent<'click' \| 'keyboard' \| 'range' \| 'lasso' \| 'sync'>) => void) \| undefined;` | optional |  |
| `highlight` | `readonly highlight?: 'series' \| 'point' \| 'cluster' \| false \| undefined;` | optional |  |
| `onPointClick` | `readonly onPointClick?: ((ctx: ChartPointContext, event: MouseEvent) => void) \| undefined;` | optional |  |
| `onPlotClick` | `readonly onPlotClick?: ((point: ChartPlotPoint, event: MouseEvent) => void) \| undefined;` | optional | Any click on the plot, with data coordinates. |
| `onPlotPointerMove` | `readonly onPlotPointerMove?: ((point: ChartPlotPoint, event: PointerEvent) => void) \| undefined;` | optional | Pointer moves over the plot, with data coordinates; called per move (keep it cheap). |
| `onPointHover` | `readonly onPointHover?: ((ctx: ChartPointContext \| null) => void) \| undefined;` | optional |  |
| `onPointChange` | `readonly onPointChange?: ((change: {     readonly seriesId: string;     readonly index: number;     readonly value: number; }, event: ChartChangeEvent<'drag' \| 'keyboard'>) => void) \| undefined;` | optional | An editable point was dragged or moved by keyboard. |
| `onPointDoubleClick` | `readonly onPointDoubleClick?: ((ctx: ChartPointContext, event: MouseEvent) => void) \| undefined;` | optional |  |
| `onAxisLabelClick` | `readonly onAxisLabelClick?: ((ctx: ChartAxisLabelContext, event: MouseEvent) => void) \| undefined;` | optional | A tick label was clicked. |
| `onAxisLabelGroupClick` | `readonly onAxisLabelGroupClick?: ((ctx: {     readonly axisId: string;     readonly group: number;     readonly level: number;     readonly label: string; }, event: MouseEvent) => void) \| undefined;` | optional | A multi-level label cell was clicked. |
| `onResize` | `readonly onResize?: ((size: {     readonly width: number;     readonly height: number; }) => void) \| undefined;` | optional |  |
| `annotations` | `readonly annotations?: readonly ChartAnnotation[] \| undefined;` | optional |  |
| `indicators` | `readonly indicators?: readonly ChartIndicator[] \| undefined;` | optional | Technical indicators; needs `features={[technicalIndicators]}` from `@salmonui/charts/chart/indicators`. |
| `stackLabels` | `readonly stackLabels?: boolean \| {     readonly format?: ChartFormat \| undefined; } \| undefined;` | optional |  |
| `palette` | `readonly palette?: readonly string[] \| undefined;` | optional |  |
| `colorRanges` | `readonly colorRanges?: readonly ChartColorRange[] \| undefined;` | optional | Point colors by y value range, shared with `legend.mode: 'range' \| 'gradient'`. |
| `renderer` | `readonly renderer?: 'svg' \| 'canvas' \| 'auto' \| undefined;` | optional |  |
| `decimation` | `readonly decimation?: 'auto' \| 'lttb' \| 'minMax' \| false \| undefined;` | optional |  |
| `accessibleTable` | `readonly accessibleTable?: boolean \| undefined;` | optional |  |
| `showDataTable` | `readonly showDataTable?: boolean \| undefined;` | optional |  |
| `renderEmpty` | `readonly renderEmpty?: (() => ReactNode) \| undefined;` | optional |  |
| `animated` | `readonly animated?: boolean \| undefined;` | optional |  |
| `locale` | `readonly locale?: string \| undefined;` | optional |  |
| `timeZone` | `readonly timeZone?: string \| undefined;` | optional |  |
| `text` | `readonly text?: Partial<ChartText> \| undefined;` | optional |  |
| `width` | `readonly width?: number \| undefined;` | optional |  |
| `height` | `readonly height?: number \| undefined;` | optional | Drawing height in px (default 300). |
| `className` | `readonly className?: string \| undefined;` | optional |  |
| `style` | `readonly style?: CSSProperties \| undefined;` | optional |  |
| `exportWriters` | `readonly exportWriters?: ChartExportWriters \| undefined;` | optional | Loaders of the PDF and XLSX writers: dynamic imports of |
| `ref` | `readonly ref?: Ref<ChartApi> \| undefined;` | optional |  |
| `children` | `readonly children?: ReactNode;` | optional |  |
