Skip to content

Documentation / @finchart/tools / drawingTools

Function: drawingTools() ​

drawingTools(options): Plugin<DrawingPane, DrawingToolsApi>

Defined in: tools/src/tools.ts:451

A drawing toolbox — one toolbox is one decoration. It doesn't make a decoration per drawing: stacking order (z) and hit order are decided by a single list, and install/teardown are tied to one plugin lifecycle.

Installs onto a pane — because it has to live and die with that pane.

ts
const tools = rsi.use(drawingTools({ plot }));
plot.removePane(rsi);   // the toolbox attached to it is cleaned up too

What must come from the chart arrives by wiring → DrawingStage

Parameters ​

options ​

DrawingToolsOptions

Returns ​

Plugin<DrawingPane, DrawingToolsApi>