import type { ContextCallbackParams, DatumCallbackParams, HighlightState, Styler } from '../../chart/callbackOptions'; import type { AgChartAutoSizedSecondaryLabelOptions } from '../../chart/labelOptions'; import type { AgSeriesTooltip, AgSeriesTooltipRendererParams } from '../../chart/tooltipOptions'; import type { ContextDefault, DatumDefault, DatumKey, PixelSize, TextAlign, VerticalAlign } from '../../chart/types'; import type { AgBaseCartesianThemeableOptions, AgBaseSeriesOptions } from '../seriesOptions'; import type { AgBaseCartesianSeriesAxisOptions, AgColorScale, FillOptions, StrokeOptions } from './commonOptions'; export type AgHeatmapSeriesItemStylerParams = DatumCallbackParams & ContextCallbackParams & AgHeatmapSeriesOptionsKeys & Required; export type AgHeatmapSeriesStyle = FillOptions & StrokeOptions; export type AgHeatmapSeriesLabelFormatterParams = AgHeatmapSeriesOptionsKeys & AgHeatmapSeriesOptionsNames; export type AgHeatmapSeriesTooltipRendererParams = AgSeriesTooltipRendererParams & AgHeatmapSeriesOptionsKeys & AgHeatmapSeriesOptionsNames & AgHeatmapSeriesStyle; export interface AgHeatmapSeriesThemeableOptions extends StrokeOptions, Omit, 'showInLegend'> { /** Options for the label in each cell. */ label?: AgChartAutoSizedSecondaryLabelOptions, TContext>; /** Minimum distance between the label text and the edges of the cell. */ itemPadding?: PixelSize; /** Horizontal position of the label. */ textAlign?: TextAlign; /** Vertical position of the label. */ verticalAlign?: VerticalAlign; /** The title to use for the series. Defaults to `yName` if it exists, or `yKey` if not. */ title?: string; /** Function used to return formatting for individual heatmap cells, based on the given parameters.*/ itemStyler?: Styler, AgHeatmapSeriesStyle>; /** Series-specific tooltip configuration. */ tooltip?: AgSeriesTooltip>; } export interface AgHeatmapSeriesOptionsKeys { /** The key to use to retrieve x-values from the data. */ xKey: DatumKey; /** The key to use to retrieve y-values from the data. */ yKey: DatumKey; /** The name of the node key containing the colour value. This value (along with `colorScale` config) will be used to determine the cell colour. */ colorKey?: DatumKey; } export interface AgHeatmapSeriesOptionsNames { /** A human-readable description of the x-values. If supplied, this will be shown in the default tooltip and passed to the tooltip renderer as one of the parameters. */ xName?: string; /** A human-readable description of the y-values. If supplied, this will be shown in the default tooltip and passed to the tooltip renderer as one of the parameters. */ yName?: string; /** A human-readable description of the colour values. If supplied, this will be shown in the default tooltip and passed to the tooltip renderer as one of the parameters. */ colorName?: string; } export interface AgHeatmapSeriesOptions extends Omit, 'showInLegend'>, AgBaseCartesianSeriesAxisOptions, AgHeatmapSeriesOptionsKeys, AgHeatmapSeriesOptionsNames, AgHeatmapSeriesThemeableOptions { /** Configuration for the Heatmap Series. */ type: 'heatmap'; /** * The colour range to interpolate the numeric colour domain (min and max `colorKey` values) into. For example, if the colour domain is `[-5, 5]` and `colorRange` is `['red', 'green']`, a `colorKey` value of `-5` will be assigned the 'red' colour, `5` - 'green' colour and `0` a blend of 'red' and 'green'. * @deprecated v13.3.0 Use `colorScale.fills` instead. */ colorRange?: string[]; /** Configuration for colour scale with fills, domain, and mode. */ colorScale?: AgColorScale; }