# HeatMapProps (@salmonui/charts/heat-map)

> The HeatMapProps interface of @salmonui/charts/heat-map.

Canonical: https://salmonui.dev/docs/reference/charts/heat-map/HeatMapProps

```ts
import type { HeatMapProps } from '@salmonui/charts/heat-map';
```

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

## Reference

Kind: interface

```ts
interface HeatMapProps {
    readonly data: readonly unknown[];
    readonly xField?: string | undefined;
    readonly yField?: string | undefined;
    readonly valueField?: string | undefined;
    readonly sizeField?: string | undefined;
    readonly xAxis?: HeatMapAxis | undefined;
    readonly yAxis?: HeatMapAxis | undefined;
    readonly colorScale?: HeatMapColorScale | undefined;
    readonly cells?: HeatMapCellsOptions | undefined;
    readonly legend?: boolean | HeatMapLegendOptions | undefined;
    readonly tooltip?: boolean | {
        readonly render?: ((cell: HeatMapCell) => ReactNode) | undefined;
    } | undefined;
    readonly selection?: boolean | {
        readonly multiple?: boolean | undefined;
    } | undefined;
    readonly selectedCells?: readonly HeatMapCellRef[] | undefined;
    readonly defaultSelectedCells?: readonly HeatMapCellRef[] | undefined;
    readonly onSelectedCellsChange?: ((cells: readonly HeatMapCellRef[], event: HeatMapChangeEvent) => void) | undefined;
    readonly hiddenItems?: readonly number[] | undefined;
    readonly defaultHiddenItems?: readonly number[] | undefined;
    readonly onHiddenItemsChange?: ((hidden: readonly number[], event: HeatMapChangeEvent) => void) | undefined;
    readonly onCellClick?: ((cell: HeatMapCell, event: HeatMapChangeEvent) => void) | undefined;
    readonly onCellDoubleClick?: ((cell: HeatMapCell) => void) | undefined;
    readonly onCellHover?: ((cell: HeatMapCell | null) => void) | undefined;
    readonly formatCell?: ((cell: HeatMapCell) => string) | undefined;
    readonly getCellStyle?: ((cell: HeatMapCell) => {
        readonly color?: string | undefined;
    } | undefined) | undefined;
    readonly renderer?: 'svg' | 'canvas' | 'auto' | 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 text?: Partial<HeatMapText> | undefined;
    readonly timeZone?: string | undefined;
    readonly showDataTable?: boolean | undefined;
    readonly className?: string | undefined;
    readonly style?: CSSProperties | undefined;
    readonly id?: string | undefined;
    readonly ref?: Ref<HeatMapApi> | undefined;
    readonly onResize?: ((size: {
        readonly width: number;
        readonly height: number;
    }) => void) | undefined;
    readonly animated?: boolean | undefined;
}
```

Members (39):

| Name | Signature | Flags | Description |
| --- | --- | --- | --- |
| `data` | `readonly data: readonly unknown[];` |  | A 2D table (`data[row][column]`) or records with `xField` / `yField` / `valueField`. |
| `xField` | `readonly xField?: string \| undefined;` | optional |  |
| `yField` | `readonly yField?: string \| undefined;` | optional |  |
| `valueField` | `readonly valueField?: string \| undefined;` | optional |  |
| `sizeField` | `readonly sizeField?: string \| undefined;` | optional | Bubble size value. |
| `xAxis` | `readonly xAxis?: HeatMapAxis \| undefined;` | optional |  |
| `yAxis` | `readonly yAxis?: HeatMapAxis \| undefined;` | optional |  |
| `colorScale` | `readonly colorScale?: HeatMapColorScale \| undefined;` | optional |  |
| `cells` | `readonly cells?: HeatMapCellsOptions \| undefined;` | optional |  |
| `legend` | `readonly legend?: boolean \| HeatMapLegendOptions \| undefined;` | optional |  |
| `tooltip` | `readonly tooltip?: boolean \| {     readonly render?: ((cell: HeatMapCell) => ReactNode) \| undefined; } \| undefined;` | optional |  |
| `selection` | `readonly selection?: boolean \| {     readonly multiple?: boolean \| undefined; } \| undefined;` | optional |  |
| `selectedCells` | `readonly selectedCells?: readonly HeatMapCellRef[] \| undefined;` | optional |  |
| `defaultSelectedCells` | `readonly defaultSelectedCells?: readonly HeatMapCellRef[] \| undefined;` | optional |  |
| `onSelectedCellsChange` | `readonly onSelectedCellsChange?: ((cells: readonly HeatMapCellRef[], event: HeatMapChangeEvent) => void) \| undefined;` | optional |  |
| `hiddenItems` | `readonly hiddenItems?: readonly number[] \| undefined;` | optional | Indices of `steps` stops whose cells are hidden (legend toggles). |
| `defaultHiddenItems` | `readonly defaultHiddenItems?: readonly number[] \| undefined;` | optional |  |
| `onHiddenItemsChange` | `readonly onHiddenItemsChange?: ((hidden: readonly number[], event: HeatMapChangeEvent) => void) \| undefined;` | optional |  |
| `onCellClick` | `readonly onCellClick?: ((cell: HeatMapCell, event: HeatMapChangeEvent) => void) \| undefined;` | optional |  |
| `onCellDoubleClick` | `readonly onCellDoubleClick?: ((cell: HeatMapCell) => void) \| undefined;` | optional |  |
| `onCellHover` | `readonly onCellHover?: ((cell: HeatMapCell \| null) => void) \| undefined;` | optional |  |
| `formatCell` | `readonly formatCell?: ((cell: HeatMapCell) => string) \| undefined;` | optional | Cell label text. |
| `getCellStyle` | `readonly getCellStyle?: ((cell: HeatMapCell) => {     readonly color?: string \| undefined; } \| undefined) \| undefined;` | optional | Cell data color override. |
| `renderer` | `readonly renderer?: 'svg' \| 'canvas' \| 'auto' \| undefined;` | optional | `auto` draws marks on canvas from 10,000 cells. Default `auto`. |
| `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 |  |
| `locale` | `readonly locale?: string \| undefined;` | optional |  |
| `text` | `readonly text?: Partial<HeatMapText> \| undefined;` | optional | Built-in text (over the nearest `LocaleProvider`'s `heatMap` entry). |
| `timeZone` | `readonly timeZone?: string \| undefined;` | optional |  |
| `showDataTable` | `readonly showDataTable?: boolean \| undefined;` | optional |  |
| `className` | `readonly className?: string \| undefined;` | optional |  |
| `style` | `readonly style?: CSSProperties \| undefined;` | optional |  |
| `id` | `readonly id?: string \| undefined;` | optional |  |
| `ref` | `readonly ref?: Ref<HeatMapApi> \| 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`. |
