using-vela-drawing-tools
Installation
SKILL.md
Using Vela drawing tools
Drawings are a model the chart owns: each one is plain JSON (type, time-and-price anchors,
style), so it saves, restores, undoes and syncs without the renderer. Users place them from
the drawing toolbar; code uses chart.drawings (in a workspace, ws.chart.drawings for the
active cell).
The toolbar
new Vela('#chart', { data: bars, drawings: false }); // no toolbar, API still works
new Vela('#chart', { data: bars, drawings: { tools: ['trendline', 'hline', 'box', 'fibretracement'] } });
new Vela('#chart', { data: bars, drawings: { groups: [{ id: 'mine', label: 'Mine', tools: ['trendline', 'ray'] }] } });