import type { TextOrSegments, TextValue } from '../series/cartesian/commonOptions'; import type { ContextDefault, DatumDefault } from './types'; type AgItemType = 'positive' | 'negative' | 'total' | 'subtotal' | 'up' | 'down' | 'low' | 'high'; export interface AgChartCallbackParams { /** The data point associated with the label. */ datum: TDatum; /** The unique identifier of the item. */ itemId?: string | number; /** The type of datum. */ itemType?: AgItemType; /** The unique identifier of the series. */ seriesId: string; /** Context for this callback. */ context?: TContext; } export type HighlightState = 'highlighted-item' | 'unhighlighted-item' | 'highlighted-branch' | 'unhighlighted-branch' | 'highlighted-series' | 'unhighlighted-series' | 'none'; export type SelectionState = 'selected-item' | 'unselected-item' | 'unselected-series' | 'none'; /** * Highlight states for hierarchical series (e.g., treemap, sunburst) that support * differentiating between nodes that share a root branch vs. those that don't. */ export type HierarchyHighlightState = Exclude | 'highlighted-branch' | 'unhighlighted-branch'; export interface DatumCallbackParams { /** The data point associated with the label. */ datum: TDatum; /** The unique identifier of the series. */ seriesId: string; /** The specific highlight state of the element. */ highlightState?: THighlightState; /** The specific selection state of the element. Undefined if the selection module is disabled. */ selectionState?: SelectionState; } export interface SeriesCallbackParams { /** The unique identifier of the series. */ seriesId: string; /** The specific highlight state of the element. */ highlightState?: THighlightState; /** The specific selection state of the element. */ selectionState?: TSelectionState; } export interface ContextCallbackParams { /** Context for this callback. */ context?: TContext; } export interface DatumItemCallbackParams extends DatumCallbackParams { /** The typeunique identifier of the item. */ itemType: ItemType; } export type Formatter

= (params: P) => TextValue | undefined; export type RichFormatter

= (params: P) => TextOrSegments | undefined; export type Styler = (params: P) => S | undefined; export type Renderer = (params: P) => TextValue | R | undefined; export type Listener = (event: E) => void; export {};