chart.history

Configuration Structure

chart: {
history: { ... },
enabled: boolean,
maxDepth: number,
coalesceMs: number,
keyboard: boolean,
}

The history options enable Rewind, a command journal that records zooms, series toggles, option changes, and annotation edits so they can be undone and redone. It needs the history feature (import 'apexcharts/features/history') and history.enabled: true. Drive it from code with chart.history.undo() / .redo(). See the Undo / Redo guide. It is part of the chart configuration.

enabled

chart.history.enabled
Default: false

Turn on the history journal. Requires import 'apexcharts/features/history'; without that import the setting has no effect.

maxDepth

chart.history.maxDepth
Default: 100

Maximum number of steps kept in the journal. Older steps drop off the bottom.

coalesceMs

chart.history.coalesceMs
Default: 250

Window in milliseconds within which rapid, high-frequency gestures (for example a continuous zoom drag) collapse into a single undo step instead of many.

keyboard

chart.history.keyboard
Default: true

Bind Ctrl-Z / Ctrl-Y (and Cmd on macOS) to undo and redo while the chart has focus.