import { type NumberValue } from 'd3-scale'; import type { DateTimeFormatter, FormatterWithPrecision, StringFormatter } from '../../core/types/formatter.js'; import { type TickAxis } from '../../core/utils/formatter-by-ticks.js'; import type { AnyXYChartScale, XYChartAxisInternal } from '../types/xy-chart-internals.js'; export declare function getTicksFormattedByConfig(config: XYChartAxisInternal | undefined, numTicks: number, scale: AnyXYChartScale | undefined, formatter: FormatterWithPrecision | DateTimeFormatter | StringFormatter | undefined, availableWidth?: number): { ticks: string[]; formattedTicks: string[]; } | { ticks: string[]; formattedTicks: string[]; numericTicks: number[]; } | { numericTicks: number[]; ticks: string[]; formattedTicks: string[]; rawTicks: NumberValue[]; }; export type FormattedTickCandidate = TickAxis & { rawTicks: NumberValue[]; }; /** * Returns a stateful candidate builder for `adaptivelyReduceHorizontalTicks`. * * Attempt 0 returns `initialResult` directly. Each subsequent attempt halves * the d3 tick-count hint (floored to `minTickCount`); if d3's nice-snapping * returns the same count for a given hint, the next halving eventually forces * d3 to pick a coarser nice step. Exposed for unit testing — production * callers should pass the result directly to `adaptivelyReduceHorizontalTicks`. */ export declare function createHalvingHintCandidateBuilder(initialResult: TickAxis, getTicksForCount: (count: number) => TickAxis, minTickCount: number): (attempt: number) => FormattedTickCandidate;