import { type ScaleLinear } from "d3-scale"; import type { AxisProps, NumericalFields, PrimitiveViewWindow, SidedNumber, TransformedData, InputFields, MaybeNumber, NonEmptyArray, YAxisPropsWithDefaults, XAxisPropsWithDefaults, AxisScales } from "../../types"; /** * This is a fatty. Takes raw user input data, and transforms it into a format * that's easier for us to consume. End result looks something like: * { * ix: [1, 2, 3], // input x values * ox: [10, 20, 30], // canvas x values * y: { * high: { i: [3, 4, 5], o: [30, 40, 50] }, * low: { ... } * } * } * This form allows us to easily e.g. do a binary search to find closest output x index * and then map that into each of the other value lists. */ export declare const transformInputData: , XK extends keyof InputFields, YK extends keyof NumericalFields>({ data: _data, xKey, yKeys, outputWindow, domain, domainPadding, xAxis, yAxes, viewport, labelRotate, axisScales, }: { data: RawData[]; xKey: XK; yKeys: YK[]; outputWindow: PrimitiveViewWindow; axisOptions?: Partial, "xScale" | "yScale">>[]; domain?: { x?: [number] | [number, number]; y?: [number] | [number, number]; }; domainPadding?: SidedNumber; xAxis: XAxisPropsWithDefaults; yAxes: YAxisPropsWithDefaults[]; viewport?: { x?: [number, number]; y?: [number, number]; }; labelRotate?: number; axisScales?: AxisScales; }) => TransformedData & { xScale: ScaleLinear; isNumericalData: boolean; xTicksNormalized: number[]; yAxes: NonEmptyArray<{ yScale: ScaleLinear; yTicksNormalized: number[]; yData: Record; }>; };