UNPKG

@mui/x-charts

Version:

The community edition of MUI X Charts components.

40 lines 2.68 kB
import type { DefaultizedProps } from '@mui/x-internals/types'; import type { BarSeriesType, DefaultizedBarSeriesType } from "./bar.js"; import { type CartesianChartSeriesType, type ChartSeriesType, type ChartsSeriesConfig, type StackableChartSeriesType } from "./config.js"; type AllSeriesType<T extends ChartSeriesType = ChartSeriesType> = ChartsSeriesConfig[T]['seriesProp']; /** * @deprecated We do not use this type in v8. If it's useful for you use case, please open an issue explaining why. * Otherwise, it will be removed in next major. */ type CartesianSeriesType = AllSeriesType<CartesianChartSeriesType>; type DefaultizedSeriesType<T extends ChartSeriesType = ChartSeriesType> = ChartsSeriesConfig[T]['series']; /** * @deprecated We do not use this type in v8. If it's useful for you use case, please open an issue explaining why. * Otherwise, it will be removed in next major. */ type DefaultizedCartesianSeriesType = DefaultizedSeriesType<CartesianChartSeriesType>; /** * @deprecated We do not use this type in v8. If it's useful for you use case, please open an issue explaining why. * Otherwise, it will be removed in next major. */ type StackableSeriesType = DefaultizedSeriesType<StackableChartSeriesType>; export type SeriesItemIdentifier<T extends ChartSeriesType = ChartSeriesType> = ChartsSeriesConfig[T]['itemIdentifier']; export type SeriesItemIdentifierWithData<T extends ChartSeriesType = ChartSeriesType> = ChartsSeriesConfig[T]['itemIdentifierWithData']; export type FocusedItemIdentifier<T extends ChartSeriesType = ChartSeriesType> = T extends 'line' | 'radar' ? DefaultizedProps<ChartsSeriesConfig[T]['itemIdentifier'], 'dataIndex'> : T extends 'heatmap' ? DefaultizedProps<ChartsSeriesConfig[T]['itemIdentifier'], 'xIndex' | 'yIndex'> : ChartsSeriesConfig[T]['itemIdentifier']; export { type SeriesId } from "./common.js"; export * from "./line.js"; export * from "./bar.js"; export * from "./scatter.js"; export * from "./pie.js"; export * from "./radar.js"; export type { AllSeriesType, DefaultizedSeriesType, CartesianSeriesType, DefaultizedCartesianSeriesType, StackableSeriesType }; /** * @deprecated We do not use this function in v8. If it's useful for you use case, please open an issue explaining why. * Otherwise, it will be removed in next major. */ export declare function isDefaultizedBarSeries(series: DefaultizedSeriesType): series is DefaultizedBarSeriesType; /** * @deprecated We do not use this function in v8. If it's useful for you use case, please open an issue explaining why. * Otherwise, it will be removed in next major. */ export declare function isBarSeries(series: AllSeriesType): series is BarSeriesType;