@mui/x-charts
Version:
The community edition of MUI X Charts components.
23 lines • 1.19 kB
TypeScript
import { AllSeriesType } from "../../../../models/seriesType/index.js";
import { ChartSeriesType, DatasetType } from "../../../../models/seriesType/config.js";
import { ChartSeriesConfig } from "../../models/seriesConfig/index.js";
import { SeriesProcessorResult } from "../../models/seriesConfig/seriesProcessor.types.js";
/**
* This methods is the interface between what the developer is providing and what components receives
* To simplify the components behaviors, it groups series by type, such that LinePlots props are not updated if some line data are modified
* It also add defaultized values such as the ids, colors
* @param series The array of series provided by the developer
* @param colors The color palette used to defaultize series colors
* @returns An object structuring all the series by type.
*/
export declare const preprocessSeries: <TSeriesType extends ChartSeriesType>({
series,
colors,
seriesConfig,
dataset
}: {
series: Readonly<AllSeriesType<TSeriesType>[]>;
colors: string[];
seriesConfig: ChartSeriesConfig<TSeriesType>;
dataset?: Readonly<DatasetType>;
}) => { [type in TSeriesType]?: SeriesProcessorResult<TSeriesType> | undefined };