useDrawings

Creates a drawing controller for <Drawings>, <DrawingToolbar> and <DrawingStyleToolbar>.

import { useDrawings } from "@reincharts/interactive";

Creates a drawing controller for <Drawings>, <DrawingToolbar> and <DrawingStyleToolbar>. Uncontrolled with defaultDrawings, controlled with drawings + onChange. The component re-renders when the controller state changes.

Signature

function useDrawings(options?: UseDrawingsOptions): DrawingController

UseDrawingsOptions

Options of useDrawings (the controller options). tools and builtinTools are read once.

Prop

Type

See also

On this page