Skip to content
EliteChart

ReplayState

Documentation


Documentation / @elitechart/core / ReplayState

Defined in: replay/replay-state.ts:16

Snapshot of bar-replay state. Returned by chart.getReplayState().

Example

code
const state: ReplayState = chart.getReplayState();
if (state.active && !state.playing) chart.playReplay();

Properties

active

code
readonly active: boolean;

Defined in: replay/replay-state.ts:18

True while the chart is in replay mode.


index

code
readonly index: number;

Defined in: replay/replay-state.ts:20

Index of the most-recent visible bar. -1 when active = false.


playing

code
readonly playing: boolean;

Defined in: replay/replay-state.ts:22

True while auto-advance is running.


rangeFromIndex

code
readonly rangeFromIndex: number | null;

Defined in: replay/replay-state.ts:30

Optional replay-range bar indices. When set, stepReplay is clamped to [rangeFromIndex, rangeToIndex] and auto-advance halts at the upper bound. null = replay covers the full bar array.


rangeToIndex

code
readonly rangeToIndex: number | null;

Defined in: replay/replay-state.ts:31


speedMs

code
readonly speedMs: number;

Defined in: replay/replay-state.ts:24

Auto-advance interval in milliseconds.