@mui/x-charts
Version:
The community edition of the charts components (MUI X).
24 lines (23 loc) • 943 B
TypeScript
import * as React from 'react';
import { AllSeriesType } from '../models/seriesType';
import { ChartSeriesType, DatasetType, FormatterResult } from '../models/seriesType/config';
import { ChartsColorPalette } from '../colorPalettes';
export type SeriesContextProviderProps = {
dataset?: DatasetType;
/**
* The array of series to display.
* Each type of series has its own specificity.
* Please refer to the appropriate docs page to learn more about it.
*/
series: AllSeriesType[];
/**
* Color palette used to colorize multiple series.
*/
colors?: ChartsColorPalette;
children: React.ReactNode;
};
export type FormattedSeries = {
[type in ChartSeriesType]?: FormatterResult<type>;
};
export declare const SeriesContext: React.Context<FormattedSeries>;
export declare function SeriesContextProvider({ series, dataset, colors, children, }: SeriesContextProviderProps): React.JSX.Element;