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): DrawingControllerUseDrawingsOptions
Options of useDrawings (the controller options). tools and builtinTools are read once.
Prop
Type
See also
- Alerts (guide)
- Saving & loading (guide)
- Custom drawing tool (example)
- Drawing toolbar (example)
- Alerts (example)
- Channels & pitchfork (example)
- Fibonacci & Gann (example)
- Drawing tools on a price chart (example)
- Freehand (example)
- Lines (example)