UNPKG

@mui/x-charts

Version:

The community edition of the charts components (MUI X).

17 lines 499 B
import * as React from 'react'; import { DrawingContext } from '../context/DrawingProvider'; export function useDrawingArea() { var _React$useContext = React.useContext(DrawingContext), left = _React$useContext.left, top = _React$useContext.top, width = _React$useContext.width, height = _React$useContext.height; return React.useMemo(function () { return { left: left, top: top, width: width, height: height }; }, [height, left, top, width]); }