@mui/x-charts
Version:
The community edition of MUI X Charts components.
15 lines • 748 B
TypeScript
import { AxisConfig } from "../models/index.js";
import { ChartsAxisProps } from "../models/axis.js";
/**
* Checks if the provided data array contains Date objects.
* @param data The data array to check.
* @returns A type predicate indicating if the data is an array of Date objects.
*/
export declare const isDateData: (data?: readonly any[]) => data is Date[];
/**
* Creates a formatter function for date values.
* @param axis The axis configuration.
* @param range The range for the time scale.
* @returns A formatter function for date values.
*/
export declare function createDateFormatter(axis: AxisConfig<'band' | 'point', any, ChartsAxisProps>, range: number[]): AxisConfig<'band' | 'point', any, ChartsAxisProps>['valueFormatter'];