import { ScaleAxis, ScaleSpec, ScaleValue, SerieAxis, ComputedSerieAxis } from './types'; type XY = ReturnType; type StackedXY = { [K in keyof XY]: XY[K] & { maxStacked: number; minStacked: number; }; }; interface SerieDatum { x: number | string | Date | null; xStacked?: number | null; y: number | string | Date | null; yStacked?: number | null; } type Serie = S & { data: readonly D[]; }; type NestedSerie = S & { data: { data: D; }[]; }; export type ComputedSerie = S & { data: { data: D; position: { x: number | null; y: number | null; }; }[]; }; export declare const getOtherAxis: (axis: ScaleAxis) => ScaleAxis; export declare const compareValues: (a: string | number, b: string | number) => boolean; export declare const compareDateValues: (a: Date, b: Date) => boolean; export declare function computeScale(spec: ScaleSpec, data: ComputedSerieAxis, size: number, axis: ScaleAxis): import("./types").ScaleLog | import("./types").ScaleSymlog | import("./types").ScaleLinear | import("./types").ScalePoint> | import("./types").ScaleBand> | import("./types").ScaleTime; /** * Compute x/y d3 scales from an array of data series, and scale specifications. * * We use generics as it's not uncommon to have extra properties such as an id * added to the series, or extra props on data, in such case, you should override * the default types. */ export declare const computeXYScalesForSeries: (series: Serie[], xScaleSpec: ScaleSpec, yScaleSpec: ScaleSpec, width: number, height: number) => { series: ComputedSerie[]; xScale: import("./types").ScaleLog | import("./types").ScaleSymlog | import("./types").ScaleLinear | import("./types").ScaleTime | import("./types").ScalePoint> | import("./types").ScaleBand>; yScale: import("./types").ScaleLog | import("./types").ScaleSymlog | import("./types").ScaleLinear | import("./types").ScaleTime | import("./types").ScalePoint> | import("./types").ScaleBand>; x: { all: unknown[]; min: unknown; max: unknown; }; y: { all: unknown[]; min: unknown; max: unknown; }; }; export declare const generateSeriesXY: (series: NestedSerie[], xScaleSpec: ScaleSpec, yScaleSpec: ScaleSpec) => { x: { all: unknown[]; min: unknown; max: unknown; }; y: { all: unknown[]; min: unknown; max: unknown; }; }; /** * Normalize data according to scale type, (time => Date, linear => Number) * compute sorted unique values and min/max. */ export declare const generateSeriesAxis: (series: SerieAxis, axis: Axis, scaleSpec: ScaleSpec, { getValue, setValue, }?: { getValue?: (d: { data: Record; }) => Value | null; setValue?: (d: { data: Record; }, v: Value) => void; }) => { all: unknown[]; min: unknown; max: unknown; }; export declare const stackAxis: (axis: ScaleAxis, xy: StackedXY, series: NestedSerie[]) => void; export {}; //# sourceMappingURL=compute.d.ts.map