@mui/x-charts
Version:
The community edition of the Charts components (MUI X).
26 lines (25 loc) • 886 B
TypeScript
import * as React from 'react';
import { Initializable } from '../context.types';
import { AxisDefaultized, ScaleName, ChartsXAxisProps, ChartsYAxisProps, AxisId } from '../../models/axis';
export type DefaultizedAxisConfig<AxisProps> = {
[axisKey: AxisId]: AxisDefaultized<ScaleName, any, AxisProps>;
};
export type CartesianContextState = {
/**
* Mapping from x-axis key to scaling configuration.
*/
xAxis: DefaultizedAxisConfig<ChartsXAxisProps>;
/**
* Mapping from y-axis key to scaling configuration.
*/
yAxis: DefaultizedAxisConfig<ChartsYAxisProps>;
/**
* The x-axes IDs sorted by order they got provided.
*/
xAxisIds: AxisId[];
/**
* The y-axes IDs sorted by order they got provided.
*/
yAxisIds: AxisId[];
};
export declare const CartesianContext: React.Context<Initializable<CartesianContextState>>;