import type { Point } from '../../core/types/point.js'; import type { BarSeriesQueryResult, RectSeriesQueryResult, SeriesQueryResult, SeriesToHoverGrid } from '../context/XYChartOverlayPerformance.context.js'; import type { AxisIdToScales } from '../context/XYChartScales.context.js'; import { type AxisIdToScaleDomain, type BarSeriesWithDatapoints, type MapDatapoints, type RectSeriesWithDatapoints, type SeriesToMetadata } from '../types/xy-chart-internals.js'; /** * Build per-series hover grids for fast point-in-rect queries. * * Each cell holds entries for datapoints whose pixel bounding box * intersects that cell, enabling near-constant-time lookup at hover * time regardless of total datapoint count. */ export declare function buildHoverGrids(seriesWithDatapoints: (RectSeriesWithDatapoints | BarSeriesWithDatapoints)[], axisIdToScales: AxisIdToScales, datapointMetadataMap: MapDatapoints, seriesToMetadata: SeriesToMetadata, axisIdToScaleDomain: AxisIdToScaleDomain): SeriesToHoverGrid; /** * Build a query that returns every series whose hovered datapoint * sits under the cursor, backed by the same per-series grids used by * the single-tooltip path. Mirrors `buildQueryAllHovered` but trades * the O(series × datapoints) linear scan for an O(series) cell * lookup — the hot path the shared tooltip walks on every mouse * move. */ export declare function buildQueryAllHoveredFromGrid(seriesIdToGrid: SeriesToHoverGrid): (arrayOfSeries: (RectSeriesWithDatapoints | BarSeriesWithDatapoints)[], position: Point) => SeriesQueryResult[]; /** * Build a hovered-datapoint query backed by pre-computed per-series * grids. Iterates the input series in reverse so the topmost * (last-rendered) overlapping datapoint wins, matching the legacy * `buildQueryHovered` behaviour. */ export declare function buildQueryHoveredFromGrid(seriesIdToGrid: SeriesToHoverGrid): { (arrayOfSeries: RectSeriesWithDatapoints[], position: Point): RectSeriesQueryResult | undefined; (arrayOfSeries: BarSeriesWithDatapoints[], position: Point): BarSeriesQueryResult | undefined; };