Public handle returned by chart.addSeries(...).

interface SeriesApi {
    applyOptions(style: Partial<SeriesStyle>): void;
    createMarkers(fallbackBars?: () => readonly Bar[]): SeriesMarkers;
    getData(): Bar[];
    prependData(bars: readonly SeriesDataItem[]): void;
    priceScale(): PriceScale;
    remove(): void;
    setData(
        bars: readonly SeriesDataItem[],
        options?: BarConfirmationOptions,
    ): void;
    update(bar: SeriesDataItem, options?: SeriesUpdateOptions): void;
}

Methods

  • Create a markers layer (buy/sell signals, shapes) bound to this series.

    fallbackBars positions a mark whose time this series has no point for, which happens whenever the series is drawn with gaps. Without it such a mark is dropped silently.

    Parameters

    • OptionalfallbackBars: () => readonly Bar[]

    Returns SeriesMarkers

  • Current bars for this series (sorted old -> new, normalized to OHLC). Handy for computing the next live update.

    Returns Bar[]

  • Remove the series from its pane and free its data rows.

    Returns void

  • Update one item. Replacing or appending the tail is live by default; older corrections are historical. Same item shapes as setData. Confirmation applies only when the supplied item is the tail; metadata on older corrections cannot alter tail confirmation. An omitted override survives same-tail writes, but clears when a new tail is appended.

    Parameters

    Returns void