@mui/x-charts
Version:
The community edition of MUI X Charts components.
11 lines • 767 B
text/typescript
import type { SeriesLegendItemParams } from "../ChartsLegend/index.mjs";
import type { ChartSeriesDefaultized, ChartSeriesType } from "../models/seriesType/config.mjs";
import type { SeriesProcessorResult } from "./plugins/corePlugins/useChartSeriesConfig/types/seriesProcessor.types.mjs";
type SeriesTypeWithLegendFields = { [T in ChartSeriesType]: ChartSeriesDefaultized<T> extends {
label?: unknown;
labelMarkType?: unknown;
color: string;
} ? T : never }[ChartSeriesType];
/** One legend item per series (bar, scatter, rangeBar, radar). */
export declare function getSeriesLegendItems<T extends SeriesTypeWithLegendFields>(type: T, params: SeriesProcessorResult<T>, defaultMarkType?: SeriesLegendItemParams['markType']): SeriesLegendItemParams[];
export {};