Skip to contentSkip to content

ChartsAxis API

API reference docs for the React ChartsAxis component. Learn about the props, CSS, and other APIs of this exported module.

Demos

Import

import { ChartsAxis } from '@mui/x-charts/ChartsAxis';
// or
import { ChartsAxis } from '@mui/x-charts';
// or
import { ChartsAxis } from '@mui/x-charts-pro/ChartsAxis';
// or
import { ChartsAxis } from '@mui/x-charts-pro';
// or
import { ChartsAxis } from '@mui/x-charts-premium/ChartsAxis';
// or
import { ChartsAxis } from '@mui/x-charts-premium';

Learn about the difference by reading this guide on minimizing bundle size.

Props

NameTypeDefaultDescription
slotPropsChartsAxisSlotProps{}

The props used for each component slot.

slotsChartsAxisSlots{}

Overridable component slots.

See Slots API below for more details.

The component cannot hold a ref.

Slots

Slot nameClass nameDefault componentDescription
axisLabelChartsTextCustom component for axis label.
axisLine'line'Custom component for the axis main line.
axisTick'line'Custom component for the axis tick.
axisTickLabelChartsTextCustom component for tick label.
xAxisChartsXAxisCustom component for the x-axis.
yAxisChartsYAxisCustom component for the y-axis.

Source code

If you did not find the information in this page, consider having a look at the implementation of the component for more detail.