Skip to contentSkip to content

ChartsWrapper API

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

Demos

Import

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

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

Props

NameTypeDefaultDescription
extendVerticallybool`false` if the `height` prop is set. And `true` otherwise.

If true, the chart wrapper set height: 100%.

hideLegendboolfalse

If true, the legend is not rendered.

legendDirection'horizontal'
| 'vertical'
'horizontal'

The direction of the legend.

legendPosition{ horizontal?: 'center'
| 'end'
| 'start', vertical?: 'bottom'
| 'middle'
| 'top' }
{ horizontal: 'center', vertical: 'bottom' }

The position of the legend.

The component cannot hold a ref.

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.