import { Selection } from 'd3-selection'; import { XYComponentCore } from '../../core/xy-component'; import { Tooltip } from '../tooltip'; import { Spacing } from '../../types/spacing'; import { CrosshairAccessors } from './types'; import { CrosshairConfigInterface } from './config'; import * as s from './style'; export declare class Crosshair extends XYComponentCore> { static selectors: typeof s; clippable: boolean; protected _defaultConfig: CrosshairConfigInterface; config: CrosshairConfigInterface; container: Selection; line: Selection; lineHorizontal: Selection; private _xPx; private _yPx; private _mouseEvent; private _animFrameId; /** Tooltip component to be used by Crosshair if not provided by the config. * This property is supposed to be set externally by a container component like XYContainer. */ tooltip: Tooltip; /** Accessors passed externally (e.g. from XYContainer) */ private _accessors; private _colorKeys; set colorKeys(colorKeys: string[]); get colorKeys(): string[]; set accessors(accessors: CrosshairAccessors); get accessors(): CrosshairAccessors; private _isContainerInViewport; constructor(config?: CrosshairConfigInterface); get bleed(): Spacing; setContainer(containerSvg: Selection): void; _render(customDuration?: number): void; hide(sourceEvent?: MouseEvent | WheelEvent): void; _onMouseMove(event: MouseEvent): void; _onMouseOut(event?: MouseEvent): void; _onWheel(event: WheelEvent): void; protected _onDestroy(): void; _showTooltip(datum: Datum | undefined, xValue: number, pos: [number, number], nearestDatumIndex: number | undefined): void; _hideTooltip(): void; getYDataExtent(): number[]; /** Y position of the horizontal crosshair line: the circle closest to the pointer (i.e. the snapped data point), * or the pointer position itself when there are no circles to snap to. `undefined` when there's nothing to draw */ private getLineHorizontalY; private getCircleData; }