@mui/x-charts
Version:
The community edition of MUI X Charts components.
15 lines • 754 B
TypeScript
import type { SeriesId } from "../models/index.js";
import type { ChartSeriesType } from "../models/seriesType/config.js";
/**
* Cleans an identifier by extracting only type, seriesId, and dataIndex properties.
* This is the common cleaner for most series types (bar, line, pie, scatter, radar, etc.).
*
* The generic constraint ensures this can only be used for series types whose
* identifier actually includes `dataIndex`. Series types with different identifier
* properties (like heatmap's xIndex/yIndex) must provide their own cleaner.
*/
export declare const identifierCleanerSeriesIdDataIndex: <T extends {
type: ChartSeriesType;
seriesId: SeriesId;
dataIndex?: number;
}>(identifier: T) => Pick<T, "type" | "seriesId" | "dataIndex">;