interface TopbarOptions {
    canSelectInterval?: (code: string) => boolean;
    captureRows?: () => readonly (string | MenuRow)[];
    indicators?: boolean;
    intervals: readonly string[];
    layouts?: LayoutsController;
    search?: SymbolSearch;
    state: () => TopbarState;
    timeframePreferences?: TimeframePreferences;
    dataAvailable(): boolean;
    indicatorsAvailable(): boolean;
    onAlerts(anchor: HTMLElement): boolean;
    onChartType(id: string): void;
    onDataWindow(anchor: HTMLElement): boolean | void;
    onGoTo(anchor: HTMLElement): boolean | void;
    onIndicators(anchor: HTMLElement): boolean;
    onInterval(code: string): void;
    onLayouts(anchor: HTMLElement): boolean | void;
    onNews(anchor: HTMLElement): boolean | void;
    onObjects(anchor: HTMLElement): boolean;
    onSettings(anchor: HTMLElement): boolean;
    onSymbol(symbol: string, exchange?: string): void;
    onTheme(next: WidgetThemeName): void;
    onWatchlist(anchor: HTMLElement): boolean | void;
    settingsAvailable(): boolean;
}

Properties

canSelectInterval?: (code: string) => boolean
captureRows?: () => readonly (string | MenuRow)[]

More capture menu rows, read on every open (the chart grid adds its whole-grid capture); a string starts a group.

indicators?: boolean

Show the indicators button. Default true.

intervals: readonly string[]

The saved layouts the Layouts button names: it shows the held layout and marks one with unsaved changes. Omitted, with onLayouts, without a store.

search?: SymbolSearch
state: () => TopbarState

The current facts, read on every refresh.

timeframePreferences?: TimeframePreferences

Methods

  • Refuse CSV export while the host is replacing or recovering its data.

    Returns boolean

  • Open the docked data window, omitted without a handler.

    Parameters

    • anchor: HTMLElement

    Returns boolean | void

  • Open the date and range navigation panel, omitted without a handler.

    Parameters

    • anchor: HTMLElement

    Returns boolean | void

  • Parameters

    • anchor: HTMLElement

    Returns boolean

  • Open the Layouts menu from anchor.

    Parameters

    • anchor: HTMLElement

    Returns boolean | void

  • Open the docked news reader, omitted without a handler (the host supplied no news source).

    Parameters

    • anchor: HTMLElement

    Returns boolean | void

  • A text control for the host's object inventory, omitted without a handler.

    Parameters

    • anchor: HTMLElement

    Returns boolean

  • Open the settings dialog from anchor. Return false when no dialog is registered.

    Parameters

    • anchor: HTMLElement

    Returns boolean

  • Parameters

    • symbol: string
    • Optionalexchange: string

    Returns void

  • Open the docked watchlist, omitted without a handler (the host supplied no lists).

    Parameters

    • anchor: HTMLElement

    Returns boolean | void