Kumo Charts

@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>): void

Starts (or restarts) replay showing the source data up to and including time.

stop(): void

Ends replay and shows all data.

play(): void
pause(): void
step(count?: number): number

Advances count steps (default 1); returns how many steps were possible.

seek(time: TimeInput): void

Moves the cursor to any time at or after the first bar, forward or back.

configure(settings: Partial<ReplaySettings>): void
state(): ReplayState | null

The replay, or null when the chart shows all data.

ReplayEventinterface소스

interface ReplayEvent
readonly state: ReplayState
readonly reason: 'step' | 'end'

end when playback reached the last source bar and paused.

ReplayEventMapinterface소스

interface ReplayEventMap
replay: ReplayEvent

Replay playback revealed data or reached the end. API calls on chart.replay emit nothing.

ReplaySettingsinterface소스

interface ReplaySettings
speed: number

Steps 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: number

Time of the last revealed source bar.

readonly playing: boolean
readonly ended: boolean

Every 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;
}>

↑↓ 선택 · Enter 열기 · Esc 닫기