import type { NumberValue } from 'd3-scale'; import type { AnyScale } from '../types/scales.js'; /** * Minimum pixel gap required between adjacent tick labels. * * Lower values keep more ticks visible at the risk of labels almost touching; * higher values trigger reduction sooner and leave more whitespace. ~6px keeps * the gap visually clear while avoiding asymmetric drops between sibling * charts whose labels differ only by a few pixels (e.g. a leading "-"). */ export declare const TICK_LABEL_GAP_PX = 6; export type ContinuousScale = Exclude number; }>; export type TickOrientation = 'horizontal' | 'vertical'; /** * Finds the pairs of adjacent tick labels that would visually overlap. * * The alignment is value-based, like the rendered axis: the tick equal to * `domainBounds[0]` and the tick equal to `domainBounds[1]` are edge-aligned, * every other label is centered on its tick. * * @param orientation - `horizontal` measures label widths, `vertical` label heights. * @param domainBounds - Scale domain as `[domain[0], domain[1]]` numbers (use * `+` to convert Date values). * @returns The original tick indices of every colliding pair. */ export declare function findLabelCollisions(orientation: TickOrientation, formattedTicks: string[], rawTicks: NumberValue[], scale: ContinuousScale, domainBounds: [number, number]): [number, number][]; /** * Detects whether any two adjacent formatted tick labels would visually * overlap. See `findLabelCollisions` for the alignment rules. */ export declare function hasLabelCollision(orientation: TickOrientation, formattedTicks: string[], rawTicks: NumberValue[], scale: ContinuousScale, domainBounds: [number, number]): boolean; //# sourceMappingURL=label-collision.d.ts.map