import { type FC, type ReactNode } from 'react'; import { type LineChartDatum, type LineChartSeries } from './LineChartContext'; export interface LineChartTooltipRow { /** Series schema for this row. */ series: LineChartSeries; /** Raw datum value at the active index for `series.key`. */ value: number | string | null | undefined; } export interface LineChartTooltipRenderArgs { /** Active datum at the cursor's nearest X position. */ datum: LineChartDatum; /** * Pre-resolved popover rows — visible series joined with their value at the * active index, in render order. Lets the render-prop be "just lay it out" * instead of "join + look up + format". */ rows: LineChartTooltipRow[]; /** Raw `xKey` value at the active datum. */ xValue: number | string; } export interface LineChartTooltipProps { /** * Render-prop override for the popover body. Receives the active datum, the * pre-resolved `rows` (visible series + value pairs), and the X value at the * cursor. When omitted, the default surface renders timestamp + rows. */ children?: (args: LineChartTooltipRenderArgs) => ReactNode; /** Custom formatter for the default popover timestamp slot. */ xTickFormatter?: (value: unknown) => ReactNode; } export declare const LineChartTooltip: FC;