import type { NumberValue } from 'd3-scale'; import { type ContinuousScale, type TickOrientation } from './label-collision.js'; export declare const DEFAULT_MIN_TICK_COUNT = 2; export interface TickCandidate { formattedTicks: string[]; rawTicks: NumberValue[]; } export interface AdaptiveReductionOptions { /** * Axis direction the labels are laid out along. */ orientation: TickOrientation; /** * Scale domain as `[domainMin, domainMax]` numbers (use `+` to convert Date * values). Collision detection aligns labels by value like the rendered axis. */ domainBounds: [number, number]; maxIterations?: number; minTickCount?: number; } /** * Adaptively reduces 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 - Axis orientation and 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 adaptivelyReduceTicks(getCandidate: (attempt: number) => T | null, scale: ContinuousScale, options: AdaptiveReductionOptions): T; //# sourceMappingURL=adaptively-reduce-ticks.d.ts.map