import type { CSSProperties } from 'react'; import type { Scales } from './components/Axis/types.js'; import type { PlotAxisContext } from './contexts/plotContext.js'; import type { CSSFuncProps, LabelFuncProps, SeriesPoint, SeriesPointError, Shape, ShapeFuncProps } from './types.js'; /** * Creates autoincremental values, generally for series. */ export declare function getNextId(): number; export declare function useId(id: string | undefined, prefix: string): string; /** * Validates that two positions are not orthogonal between them */ export declare function validatePosition(currPosition: string, position: string, id: string): void; interface ValidateAxisOptions { onlyOrthogonal?: boolean; } /** * Validates that two axes are orthogonal between them */ export declare function validateAxis(axisContext: Record, xKey: string, yKey: string, options?: ValidateAxisOptions): [Scales, Scales] | [undefined, undefined]; /** * Checks the style added to a component and if is a function, gets the resulting value */ export declare function functionalStyle(defaultStyle: CSSProperties, elementStyle: CSSFuncProps, point: T, index?: number, data?: readonly T[]): CSSProperties; /** * Checks the marker added to a component and if is a function, gets the resulting value */ export declare function functionalShape(elementStyle: ShapeFuncProps, point: T, index?: number, data?: readonly T[]): Shape; /** * Checks the label added to a component and if is a function, gets the resulting value */ export declare function functionalLabel(elementStyle: LabelFuncProps, point: T, index?: number, data?: readonly T[]): string; /** * validate series point Error */ export declare function validateSeriesPointError(error?: SeriesPointError): Exclude | null; export declare function closestPoint(data: readonly T[], value: R, distanceFun: (a: T, b: R) => number): T; export declare function dataConvertDate(data: Array<{ x: number | Date; y: number | Date; }>): { x: number; y: number; }[]; export declare function toNumber(value: number | Date): number; export declare function middlePoint(point1: SeriesPoint, point2: SeriesPoint): { x: number; y: number; }; export {}; //# sourceMappingURL=utils.d.ts.map