UNPKG

@mui/x-charts

Version:

The community edition of MUI X Charts components.

15 lines 964 B
import type { SeriesItemIdentifierWithType } from "../../../../../models/index.mjs"; import type { ChartSeriesType } from "../../../../../models/seriesType/config.mjs"; import type { ChartSeriesConfig } from "../types/index.mjs"; /** * Cleans a series item identifier by extracting only the relevant properties * using the appropriate cleaner from the provided series configuration. * * @param {ChartSeriesConfig<ChartSeriesType>} seriesConfig - The configuration object for chart series. * @param {object} identifier - The series item identifier to clean. * @returns {object} A cleaned identifier object with only the properties relevant to the series type. * @throws Will throw an error if no cleaner is found for the given series type. */ export declare const cleanIdentifier: <SeriesType extends ChartSeriesType, U extends { type: SeriesType; }>(seriesConfig: ChartSeriesConfig<SeriesType>, identifier: U) => SeriesItemIdentifierWithType<SeriesType>;