import type { NumberValue } from 'd3-scale'; import { type ContinuousScale } from './has-horizontal-label-collision.js'; export declare const DEFAULT_MIN_TICK_COUNT = 2; export interface TickCandidate { formattedTicks: string[]; rawTicks: NumberValue[]; } export interface AdaptiveReductionOptions { maxIterations?: number; minTickCount?: number; /** * When provided, collision detection uses domain-aware alignment (AC1) instead * of the legacy index-based alignment. Pass `[domainMin, domainMax]` as numbers * (use `+` to convert Date values). */ domainBounds?: [number, number]; } /** * Adaptively reduces horizontal tick candidates until labels no longer * collide or the minimum tick count is reached. * * @param getCandidate - Called on each iteration with the 0-based attempt * index. Must return the next candidate tick set. The callback is * responsible for its own reduction strategy (e.g. doubling the step, * halving the d3 tick count hint, etc.). Return `null` to signal that * no further reduction is possible and the loop should stop. * @param scale - The d3 continuous scale used for pixel-position calculations. * @param options - Tuning knobs for the reduction loop. * @returns The first non-colliding candidate, or the last candidate when * the loop exhausts all iterations / reaches the minimum tick count. */ export declare function adaptivelyReduceHorizontalTicks(getCandidate: (attempt: number) => T | null, scale: ContinuousScale, options?: AdaptiveReductionOptions): T;