@kumo-charts/core/replay
API リファレンスはソースコードのコメントから生成しており、英語のみです。
import { … } from '@kumo-charts/core/replay';
Functions
replayfunctionソース
function replay(): ReplayModule
The replay module: chart.replay, replaying the bars one by one from a time in the past.
Interfaces
ReplayApiinterfaceソース
interface ReplayApi
Bar replay. A time cursor hides the source data after it: timeframes, indicators, alerts,
series and markers see only the revealed past, and a coarser timeframe shows its bar forming
from the revealed source bars. Data keeps streaming in while replaying and stays hidden until
the cursor reaches it. Playback emits replay events; these calls emit nothing.
start(time: TimeInput, settings?: Partial<ReplaySettings>): voidStarts (or restarts) replay showing the source data up to and including time.
stop(): voidEnds replay and shows all data.
play(): voidpause(): voidstep(count?: number): numberAdvances count steps (default 1); returns how many steps were possible.
seek(time: TimeInput): voidMoves the cursor to any time at or after the first bar, forward or back.
configure(settings: Partial<ReplaySettings>): voidstate(): ReplayState | nullThe replay, or null when the chart shows all data.
ReplayEventinterfaceソース
interface ReplayEvent
readonly state: ReplayStatereadonly reason: 'step' | 'end'end when playback reached the last source bar and paused.
ReplayEventMapinterfaceソース
interface ReplayEventMap
replay: ReplayEventReplay playback revealed data or reached the end. API calls on chart.replay emit nothing.
ReplaySettingsinterfaceソース
interface ReplaySettings
speed: numberSteps per second while playing.
step: 'bar' | 'source'bar completes the displayed bar in progress or reveals the next one; source reveals one
source bar, so a coarser timeframe shows its bar forming.
ReplayStateinterfaceソース
interface ReplayState extends ReplaySettings
readonly time: numberTime of the last revealed source bar.
readonly playing: booleanreadonly ended: booleanEvery source bar is revealed; new data arriving later is revealed by further steps.
Types
ReplayModuletypeソース
type ReplayModule = ChartModule<{
readonly api: { readonly replay: ReplayApi };
readonly events: ReplayEventMap;
}>