import { Scale } from '../scales'; import { ChartTheme } from '../theme'; import { Series } from './Series'; import { PlotArea, CursorState, AxisOptions } from '../types'; import { ChartTitleOptions, AxisLayoutOptions } from './layout/types'; import { BusinessDayMapping } from './time/TimeScale'; export declare class OverlayRenderer { private ctx; private theme; private latexAPI; private businessDayMapping; constructor(ctx: CanvasRenderingContext2D, theme: ChartTheme); setBusinessDayMapping(mapping: BusinessDayMapping | null): void; /** Filter X ticks to valid business-day indices (unique integers in range). */ private filterBusinessDayXTicks; private resolveXTicks; /** * Grid X lines use the full viewport domain (nice even spacing), including * regions past the loaded series. Axis labels stay filtered to real data. */ private resolveGridXTicks; /** * Set LaTeX API for rendering mathematical expressions */ setLatexAPI(api: any): void; /** * Helper to draw text or LaTeX */ private drawLatexOrText; /** * Update the theme */ setTheme(theme: ChartTheme): void; /** * Clear the overlay */ clear(): void; /** * Draw the grid */ drawGrid(plotArea: PlotArea, xScale: Scale, yScale: Scale, xAxisOptions?: AxisOptions, yAxisOptions?: AxisOptions): void; /** * Draw polar grid (radial circles and angular spokes) */ drawPolarGrid(plotArea: PlotArea, xScale: Scale, yScale: Scale, radialDivisions?: number, angularDivisions?: number, angleMode?: 'degrees' | 'radians'): void; /** * Draw X axis with ticks and labels */ drawXAxis(plotArea: PlotArea, xScale: Scale, options?: AxisOptions, layout?: AxisLayoutOptions): void; /** * Draw Y axis with ticks and labels */ drawYAxis(plotArea: PlotArea, yScale: Scale, options?: AxisOptions, position?: "left" | "right", offset?: number, layout?: AxisLayoutOptions): void; /** * Draw plot area border */ drawPlotBorder(plotArea: PlotArea): void; /** * Draw chart title */ drawChartTitle(plotArea: PlotArea, options: ChartTitleOptions): void; /** * Draw legend */ drawLegend(plotArea: PlotArea, series: Series[]): void; /** * Helper to draw a symbol in the legend */ private drawLegendSymbol; /** * Draw cursor/crosshair */ drawCursor(plotArea: PlotArea, cursor: CursorState, lineStyle?: 'solid' | 'dashed' | 'dotted'): void; /** * Draw tooltip */ private drawTooltip; /** * Draw tooltip in a fixed corner position */ private drawCornerTooltip; /** * Draw selection rectangle (Box Zoom) */ drawSelectionRect(rect: { x: number; y: number; width: number; height: number; }): void; /** * Draw error bars for a series */ drawErrorBars(plotArea: PlotArea, series: Series, xScale: Scale, yScale: Scale): void; private generateMinorTicks; private formatXTick; private formatYTick; /** Draw buy/sell markers on candlestick series (Stage 2.14). */ drawCandlestickMarkers(plotArea: PlotArea, series: Series, xScale: Scale, yScale: Scale): void; /** Horizontal dashed lines for active price alerts (Stage 2.19). */ drawPriceAlertLines(plotArea: PlotArea, alerts: Array<{ price: number; direction?: string; }>, yScale: Scale): void; }