The slice of the chart this controller needs. Chart satisfies it; declaring it structurally keeps the controller testable against a stub and free of a circular import back into core.

interface ReplayChartHost {
    timeScale: ReplayViewport;
    emit(event: string, payload: unknown): void;
    on(event: "destroy", callback: () => void): () => void;
    primarySeries(): null | SeriesApi;
}

Hierarchy (View Summary)

Properties

Methods

Properties

timeScale: ReplayViewport

Methods

  • Optional. When the chart reports its own end, replay listens for it while it owns the chart's data: a chart destroyed mid-session stops the playback timer and is written to no more, and nothing is restored to it.

    Parameters

    • event: "destroy"
    • callback: () => void

    Returns () => void