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.
| Name | Type | Default | Description |
|---|---|---|---|
| slotProps | ChartsAxisSlotProps | {} | The props used for each component slot. |
| slots | ChartsAxisSlots | {} | Overridable component slots. See Slots API below for more details. |
The component cannot hold a ref.
| Slot name | Class name | Default component | Description |
|---|---|---|---|
| axisLabel | ChartsText | Custom component for axis label. | |
| axisLine | 'line' | Custom component for the axis main line. | |
| axisTick | 'line' | Custom component for the axis tick. | |
| axisTickLabel | ChartsText | Custom component for tick label. | |
| xAxis | ChartsXAxis | Custom component for the x-axis. | |
| yAxis | ChartsYAxis | Custom 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.