What getState returns and restoreState takes. JSON-safe.

interface WidgetState {
    chart: ChartState & ChartSettingsState & { timezone: string };
    chartType: string;
    exchange: string;
    interval: string;
    panels?: PanelDockState;
    rail: null | RailPrefs;
    savedBy?: string;
    symbol: string;
    theme: WidgetThemeName;
    variant?: DataVariant;
    version: 1;
}

Properties

chart: ChartState & ChartSettingsState & { timezone: string }
chartType: string
exchange: string
interval: string

Optional in older records. Width is bounded when restored.

rail: null | RailPrefs
savedBy?: string

The library version that wrote the state (since 2.6.3). Absent in older records, which wrote every navigation option whether chosen or not.

symbol: string
variant?: DataVariant

The data variant, absent for the feed's default. Optional in older records.

version: 1