import type { PlotLineConfig } from '../../types'; import type Yagr from '../../index'; declare module '../../types' { interface PBandConfig { label?: string; } interface PLineConfig { label?: string; } } type PerScale = { [scale: string]: T; }; type PerSeries = { [series: string]: T; }; type PerAxis = { [axis: string]: T; }; export interface CommonLabel { show?: boolean; className?: string; position?: (xVal: number, y: number | null | undefined) => [x: number, y: number]; onRender?: (e: HTMLElement) => void; onDestroy?: (e: HTMLElement) => void; } export interface PointLabel extends CommonLabel { label?: string | ((x: number, y: number | null | undefined, idx: number) => string | undefined | null); render?: (yagr: Yagr, seriesIdx: number, xIdx: number, scale: string, label: PointLabel) => Clear; } export interface PlotLabel extends CommonLabel { label?: string | ((band: PlotLineConfig) => string | undefined | null); render?: (yagr: Yagr, plotLine: PlotLineConfig, x: number, y: number, label: PlotLabel) => Clear; } export interface AxisLabel extends CommonLabel { value: number; label?: string | ((a: AxisLabel) => string | undefined | null); render?: (yagr: Yagr, x: number, y: number, label: AxisLabel) => Clear; } export interface LabelsOptions { series?: { cursor?: PerSeries; focus?: PerSeries; draw?: PerSeries; }; scales?: { cursor?: PerScale; draw?: PerScale; }; axes?: PerAxis; plotLines?: { cursor?: PerScale; draw?: PerScale; }; } export type Clear = () => void; export {};