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';
Learn about the difference by reading this guide on minimizing bundle size.
Wrapper for the charts components. Its main purpose is to position the HTML legend in the correct place.
Name | Type | Default | Description |
---|---|---|---|
extendVertically | bool | `false` if the `height` prop is set. And `true` otherwise. | If |
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.