import type { BBox, BoxBounds, Node, Path } from 'ag-charts-core'; import type { SeriesNodeDatum } from './seriesTypes'; /** Modes of matching user interactions to rendered nodes (e.g. hover or click) */ export declare enum SeriesNodePickMode { /** Pick matches based upon pick coordinates being inside a matching shape/marker. */ EXACT_SHAPE_MATCH = 0, /** Pick matches based upon distance to ideal position */ NEAREST_NODE = 1, /** Pick matches based upon distance from axis */ AXIS_ALIGNED = 2 } /** SeriesNodeDatum values with a special meaning */ export declare enum SeriesNodeDatumSentinel { /** This SeriesNodeDatum does not exist: it's culled as part of a rendering optimisation like M4 aggregation. */ CULLED = 1 } export type SeriesNodePickIntent = 'tooltip' | 'highlight' | 'highlight-tooltip' | 'context-menu' | 'event'; export type SeriesNodePickMatch = { datum: SeriesNodeDatum; distance: number; /** * The scene-node hit under the pointer, as accurate as possible. Exact-shape and * nearest-object picks report the matched leaf; modes that match on datum geometry (e.g. * "closest") cannot resolve the leaf efficiently and fall back to the series `contentGroup`. */ target: Node; }; export type PickFocusInputs = { readonly datumIndex: number; readonly datumIndexDelta: number; readonly otherIndex: number; readonly otherIndexDelta: number; readonly seriesRect?: BBox; }; export type PickViewportFocusInputs = { readonly otherIndex: number; readonly where: 'data-start' | 'data-end' | 'viewport-start' | 'viewport-end'; readonly hoverRect: Readonly; }; export type PickFocusOutputs = { datumIndex: number; datum: SeriesNodeDatum | SeriesNodeDatumSentinel; otherIndex?: number; bounds: BBox | Path; movedBounds?: BBox; clipFocusBox: boolean; }; export type PickResult = { pickMode: SeriesNodePickMode; picks: SeriesNodePickMatch[]; }; export type PickNodesInBBoxPredicate = (selectionBox: BoxBounds, node: Node) => boolean;