charton API / @chart-on/core / index / History
Interface: History
Defined in: packages/core/src/history.ts:19
The chart's undo history (chart.history), shared by drawings and indicators: one list of steps in the order they were made. Only the drawings and indicators plugins make steps, so on a chart without them there is never anything to undo.
Properties
canRedo
readonlycanRedo:boolean
Defined in: packages/core/src/history.ts:23
Whether there is an undone step to redo.
canUndo
readonlycanUndo:boolean
Defined in: packages/core/src/history.ts:21
Whether there is a step to undo.
Methods
clear()
clear():
void
Defined in: packages/core/src/history.ts:29
Forget every step.
Returns
void
redo()
redo():
boolean
Defined in: packages/core/src/history.ts:27
Make the last undone step again; during a drawing gesture, only cancel it. Returns false when there was nothing to redo.
Returns
boolean
undo()
undo():
boolean
Defined in: packages/core/src/history.ts:25
Take back the last step; during a drawing gesture, only cancel it. Returns false when there was nothing to undo.
Returns
boolean