import { type FC } from 'react'; /** * Tick-spacing preset. Maps to `minTickGap` so callers don't have to think in * pixels for the common case — explicit `minTickGap` still wins if passed. * * - `'sparse'` → 64px gap (wide labels, long ranges) * - `'normal'` → 32px gap (sane default for hourly / daily timeseries) * - `'dense'` → 16px gap (short labels, short ranges) */ export type LineChartXAxisDensity = 'sparse' | 'normal' | 'dense'; export interface LineChartXAxisProps { /** Format the rendered tick label. Receives the raw datum value at the tick. */ tickFormatter?: (value: unknown, index: number) => string; /** * Curated tick-spacing preset (`'sparse' | 'normal' | 'dense'`). Sets * `minTickGap` to 64/32/16px respectively. Explicit `minTickGap` overrides * the preset — reach for that escape hatch when no preset fits. */ density?: LineChartXAxisDensity; /** Recharts tick interval — `0` to render every tick, the literal strings to auto-pick. */ interval?: number | 'preserveStart' | 'preserveEnd' | 'preserveStartEnd' | 'equidistantPreserveStart'; /** Recharts target tick count. */ tickCount?: number; /** Explicit tick values. Overrides recharts' generator. */ ticks?: ReadonlyArray; /** Minimum gap (in pixels) between rendered tick labels. Overrides `density`. */ minTickGap?: number; /** Recharts domain override — `['auto', 'auto']` by default. */ domain?: [ number | string | 'auto' | 'dataMin' | 'dataMax', number | string | 'auto' | 'dataMin' | 'dataMax' ]; /** Padding between the plot edge and the first/last tick. */ padding?: { left?: number; right?: number; } | 'gap' | 'no-gap'; /** Recharts axis scale type — `'category'` (default for line charts) or `'number'` for continuous X. */ type?: 'category' | 'number'; /** Render the axis area as a spacer (preserves layout, hides the labels). */ hideTicks?: boolean; /** * Render the solid bottom axis line. Defaults to `true` — the line owns the * bottom rail of the plot (the `` drops its bottom horizontal * grid line to avoid stacking on top of it). Pass `false` for sparkline-style * plots; in that case set `` if a bottom rail * is still wanted. */ axisLine?: boolean; } export declare const LineChartXAxis: FC;