UNPKG

@mui/x-charts

Version:

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

44 lines (43 loc) 1.24 kB
import * as React from 'react'; import { LayoutConfig } from '../models/layout'; export interface DrawingProviderProps extends LayoutConfig { children: React.ReactNode; svgRef: React.RefObject<SVGSVGElement>; } /** * Defines the area in which it is possible to draw the charts. */ export type DrawingArea = { /** * The gap between the left border of the SVG and the drawing area. */ left: number; /** * The gap between the top border of the SVG and the drawing area. */ top: number; /** * The gap between the bottom border of the SVG and the drawing area. */ bottom: number; /** * The gap between the right border of the SVG and the drawing area. */ right: number; /** * The width of the drawing area. */ width: number; /** * The height of the drawing area. */ height: number; }; export declare const DrawingContext: React.Context<DrawingArea & { /** * A random id used to distinguish each chart on the same page. */ chartId: string; }>; export declare const SvgContext: React.Context<React.RefObject<SVGSVGElement>>; export declare function DrawingProvider(props: DrawingProviderProps): React.JSX.Element;