import { SnapToValue } from '../../types'; import UPlot, { Plugin } from 'uplot'; import type Yagr from '../..'; /** * Options for cursor plugin. */ export interface CursorOptions { /** Diameter of point markers */ markersSize?: number; /** Snap cursor to non-null value (default: SnapToValue.Closest) */ snapToValues?: false | SnapToValue; /** X crosshair options */ x?: { visible?: boolean; style?: string; }; /** Y crosshair options */ y?: { visible?: boolean; style?: string; }; /** Max count of visible markers. If lines > value then markers will be hidden (default: 50) */ maxMarkers?: number; /** Cursror sync key (default if true) */ sync?: true | string; /** Hide cursor markers by predicate */ hideMarkers?: (value: number | null | string, seriesIdx: number) => boolean; } export declare function cursorPoint(u: UPlot, seriesIndex: number): HTMLElement; export default function CursorPlugin(yagr: Yagr, opts: CursorOptions): { pin: (v: boolean) => void; focus: (i: number | null, f: boolean) => void; uplot: Plugin; updatePoints: () => void; showPoints: (idx?: number) => void; hidePoints: (idx?: number) => void; };