Skip to content

DrawingProvider API

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

Component demos

Import

import { DrawingProvider } from '@mui/x-charts/context';
// or
import { DrawingProvider } from '@mui/x-charts';
Learn about the difference by reading this guide on minimizing bundle size.

Props

margin

The margin between the SVG and the drawing area. It's used for leaving some space for extra information such as the x- and y-axis or legend. Accepts an object with the optional properties: top, bottom, left, and right.

Type:{ bottom?: number, left?: number, right?: number, top?: number }

Default:object Depends on the charts type.


The component cannot hold a ref.