import { ScaleBand, ScaleLinear, ScaleLogarithmic, ScaleTime } from 'd3-scale'; import { ScaleKind } from './types'; export type ContinuousScale = ScaleLinear | ScaleLogarithmic | ScaleTime; export type ChartXScale = ContinuousScale | ScaleBand; export type ChartYScale = ScaleLinear; export declare function isBandScale(scale: ChartXScale): scale is ScaleBand; export declare function createXScale(kind: ScaleKind, domain: Array, range: [number, number]): ChartXScale; export declare function createYScale(domain: [number, number], range: [number, number], nice: boolean): ChartYScale; /** * Positions a datum on the x axis. Band values map to the center of their band * so line/scatter series can share an axis with bar series. */ export declare function xPosition(scale: ChartXScale, value: string | number): number; /** Tick values for an x scale: band domains list every band. */ export declare function xTickValues(scale: ChartXScale, count: number): Array; /** * Default tick label formatter. Continuous scales use d3's smart tick format * (time scales pick a unit-appropriate representation); bands echo the value. */ export declare function defaultTickFormat(scale: ChartXScale | ChartYScale, count: number): (value: string | number | Date) => string;