@mui/x-charts
Version:
The community edition of MUI X Charts components.
36 lines • 1.59 kB
TypeScript
import type { AxisId, AxisScaleConfig, ScaleName } from "../models/axis.js";
/**
* Get the X scale.
*
* @param axisId - The axis identifier. Can be:
* - A string or number matching the axis ID defined in the chart's `xAxis` prop
* - Undefined to get the default (first) X axis
* @returns The X axis scale
*/
export declare function useXScale<S extends ScaleName>(axisId?: AxisId): AxisScaleConfig[S]['scale'];
/**
* Get the Y scale.
*
* @param axisId - The axis identifier. Can be:
* - A string or number matching the axis ID defined in the chart's `yAxis` prop
* - Undefined to get the default (first) Y axis
* @returns The Y axis scale
*/
export declare function useYScale<S extends ScaleName>(axisId?: AxisId): AxisScaleConfig[S]['scale'];
/**
* Get the rotation scale.
*
* @param axisId - The axis identifier. Can be:
* - A string or number matching the axis ID defined in the chart's `rotationAxis` prop
* - Undefined to get the default rotation axis
* @returns The rotation axis scale, or undefined if not found
*/
export declare function useRotationScale<S extends ScaleName>(axisId?: number | string): AxisScaleConfig[S]['scale'] | undefined;
/**
* Get the radius scale.
* @param axisId - The axis identifier. Can be:
* - A string or number matching the axis ID defined in the chart's `radiusAxis` prop
* - Undefined to get the default radius axis
* @returns The radius axis scale, or undefined if not found
*/
export declare function useRadiusScale<S extends ScaleName>(axisId?: number | string): AxisScaleConfig[S]['scale'] | undefined;