/** * How values are spread along an axis or a channel. 'linear' spreads them evenly. 'log' * gives every power of ten the same room and has no place for zero or negative values. * 'sqrt' and 'symlog' compress large values and keep zero and negative ones. */ export type ScaleType = 'linear' | 'log' | 'sqrt' | 'symlog'; interface Warp { to: (value: number) => number; from: (warped: number) => number; } /** The two directions of a scale type: into the space where values are spread evenly, and back. */ export declare const warp: (type?: ScaleType) => Warp; /** * Where a value sits in a range, from 0 at its start to 1 at its end; outside that for a * value outside the range. NaN when the value has no place, such as zero on a log scale. */ export declare function position(domain: readonly [number, number], value: number, type?: ScaleType): number; /** The value at a share of a range. The inverse of `position`. */ export declare function valueAt(domain: readonly [number, number], share: number, type?: ScaleType): number; /** * Ticks for a log axis: the powers of ten in the range, and between them the multiples * 2 and 5 while there is room for them. A range inside one power of ten gets linear ticks. */ export declare function logTicks(min: number, max: number, wanted: number): number[] | undefined; export {};