API reference: @salmonui/charts/heat-map
HeatMapPropsinterface
import type { HeatMapProps } from '@salmonui/charts/heat-map';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;
}
| Name | Signature | Description |
|---|---|---|
data | readonly data: readonly unknown[]; | A 2D table ( |
xFieldoptional | readonly xField?: string | undefined; | |
yFieldoptional | readonly yField?: string | undefined; | |
valueFieldoptional | readonly valueField?: string | undefined; | |
sizeFieldoptional | readonly sizeField?: string | undefined; | Bubble size value. |
xAxisoptional | readonly xAxis?: HeatMapAxis | undefined; | |
yAxisoptional | readonly yAxis?: HeatMapAxis | undefined; | |
colorScaleoptional | readonly colorScale?: HeatMapColorScale | undefined; | |
cellsoptional | readonly cells?: HeatMapCellsOptions | undefined; | |
legendoptional | readonly legend?: boolean | HeatMapLegendOptions | undefined; | |
tooltipoptional | readonly tooltip?: boolean | {
readonly render?: ((cell: HeatMapCell) => ReactNode) | undefined;
} | undefined; | |
selectionoptional | readonly selection?: boolean | {
readonly multiple?: boolean | undefined;
} | undefined; | |
selectedCellsoptional | readonly selectedCells?: readonly HeatMapCellRef[] | undefined; | |
defaultSelectedCellsoptional | readonly defaultSelectedCells?: readonly HeatMapCellRef[] | undefined; | |
onSelectedCellsChangeoptional | readonly onSelectedCellsChange?: ((cells: readonly HeatMapCellRef[], event: HeatMapChangeEvent) => void) | undefined; | |
hiddenItemsoptional | readonly hiddenItems?: readonly number[] | undefined; | Indices of |
defaultHiddenItemsoptional | readonly defaultHiddenItems?: readonly number[] | undefined; | |
onHiddenItemsChangeoptional | readonly onHiddenItemsChange?: ((hidden: readonly number[], event: HeatMapChangeEvent) => void) | undefined; | |
onCellClickoptional | readonly onCellClick?: ((cell: HeatMapCell, event: HeatMapChangeEvent) => void) | undefined; | |
onCellDoubleClickoptional | readonly onCellDoubleClick?: ((cell: HeatMapCell) => void) | undefined; | |
onCellHoveroptional | readonly onCellHover?: ((cell: HeatMapCell | null) => void) | undefined; | |
formatCelloptional | readonly formatCell?: ((cell: HeatMapCell) => string) | undefined; | Cell label text. |
getCellStyleoptional | readonly getCellStyle?: ((cell: HeatMapCell) => {
readonly color?: string | undefined;
} | undefined) | undefined; | Cell data color override. |
rendereroptional | readonly renderer?: 'svg' | 'canvas' | 'auto' | undefined; |
|
widthoptional | readonly width?: number | undefined; | |
heightoptional | readonly height?: number | undefined; | |
titleoptional | readonly title?: string | undefined; | |
subtitleoptional | readonly subtitle?: string | undefined; | |
descriptionoptional | readonly description?: string | undefined; | |
localeoptional | readonly locale?: string | undefined; | |
textoptional | readonly text?: Partial<HeatMapText> | undefined; | Built-in text (over the nearest |
timeZoneoptional | readonly timeZone?: string | undefined; | |
showDataTableoptional | readonly showDataTable?: boolean | undefined; | |
classNameoptional | readonly className?: string | undefined; | |
styleoptional | readonly style?: CSSProperties | undefined; | |
idoptional | readonly id?: string | undefined; | |
refoptional | readonly ref?: Ref<HeatMapApi> | undefined; | |
onResizeoptional | readonly onResize?: ((size: {
readonly width: number;
readonly height: number;
}) => void) | undefined; | |
animatedoptional | readonly animated?: boolean | undefined; | Entrance and update transitions, default |