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, CssColor, DatumDefault, DatumKey, GeoJSON, PixelSize } from '../../chart/types'; import type { AgColorScale, FillOptions, LineDashOptions, StrokeOptions } from '../cartesian/commonOptions'; import type { AgBaseSeriesOptions, AgBaseSeriesThemeableOptions, AgHighlightStyleOptions, AgMultiSeriesHighlightOptions } from '../seriesOptions'; export interface AgMapShapeSeriesTooltipRendererParams extends AgSeriesTooltipRendererParams, AgMapShapeSeriesOptionsKeys, AgMapShapeSeriesOptionsNames, AgMapShapeSeriesStyle { } export type AgMapShapeSeriesStyle = FillOptions & StrokeOptions & LineDashOptions; export type AgMapShapeSeriesLabelFormatterParams = AgMapShapeSeriesOptionsKeys & AgMapShapeSeriesOptionsNames; export type AgMapShapeSeriesItemStylerParams = DatumCallbackParams & ContextCallbackParams & AgMapShapeSeriesOptionsKeys & Required; export interface AgMapShapeSeriesOptionsKeys { /** The name of the node key containing the id value. */ idKey?: DatumKey; /** The name of the node key containing the colour value. This value (along with `colorScale` config) will be used to determine the segment colour. */ colorKey?: DatumKey; /** The key to use to retrieve values from the data to use as labels inside shapes. */ labelKey?: DatumKey; } export interface AgMapShapeSeriesOptionsNames { /** A human-readable description of the id-values. If supplied, this will be shown in the default tooltip and passed to the tooltip renderer as one of the parameters. */ idName?: 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; /** A human-readable description of the label values. If supplied, this will be shown in the default tooltip and passed to the tooltip renderer as one of the parameters. */ labelName?: string; } export interface AgMapShapeSeriesThemeableOptions extends AgMapShapeSeriesStyle, Omit, 'highlightStyle' | 'highlight'> { /** * The colour range to interpolate the numeric colour domain (min and max `colorKey` values) into. * @deprecated v13.3.0 Use `colorScale.fills` instead. */ colorRange?: CssColor[]; /** Configuration for colour scale with fills, domain, and mode. */ colorScale?: AgColorScale; /** Configuration for the labels shown inside the shape. */ label?: AgChartAutoSizedSecondaryLabelOptions, TContext>; /** Distance between the shape edges and the text. */ padding?: PixelSize; /** Series-specific tooltip configuration. */ tooltip?: AgSeriesTooltip>; /** A callback function for adjusting the styles of a particular Map shape based on the input parameters. */ itemStyler?: Styler, AgMapShapeSeriesStyle>; /** Configuration for highlighting when a series or legend item is hovered over. */ highlight?: AgMultiSeriesHighlightOptions; } export interface AgMapShapeSeriesOptions extends Omit, 'highlightStyle' | 'highlight'>, AgMapShapeSeriesOptionsKeys, AgMapShapeSeriesOptionsNames, AgMapShapeSeriesThemeableOptions { /** Configuration for the Map Shape Series. */ type: 'map-shape'; /** GeoJSON data. */ topology?: GeoJSON; /** * The property to reference in the topology to match up with data. * * Default: `name` */ topologyIdKey?: string; /** The title to use for the series. */ title?: string; /** * The text to display in the legend for this series. * If multiple series share this value, they will be merged for the legend toggle behaviour. */ legendItemName?: string; }