interface WidgetOptions {
    animAutoscale?: boolean;
    animZoom?: boolean;
    ariaLabel?: string;
    axisChrome?: AxisChromeOptions;
    branding?: boolean | LogoWatermarkOptions;
    canvas?: CanvasOptions;
    chartType?: string;
    conflate?: boolean;
    conflationFactor?: number;
    crosshairMode?: CrosshairMode;
    document?: Document;
    doubleClick?: DoubleClickAction;
    exchange?: string;
    feed?: DataFeed;
    grid?: Partial<GridOptions>;
    indicators?: boolean;
    interval?: string;
    intervals?: readonly string[];
    legendOffset?: { left?: number; top?: number };
    loading?: DataLoadingOptions;
    locale?: string;
    lookbackBars?: number;
    mobile?: MobileMode;
    navigation?: Partial<ChartNavigationOptions>;
    now?: () => number;
    onOrder?: (order: OrderRequest) => void;
    persist?: string | boolean;
    pixelRatio?: () => number;
    priceAxisWidth?: number;
    priceFormatter?: (price: number) => string;
    priceScale?: Partial<PriceScaleOptions>;
    raf?: { cancel?: RafCanceller; schedule: RafScheduler };
    rail?: boolean | RailOptions;
    renderBackend?: RenderBackendFactory;
    renderer?: RendererChoice;
    shortcuts?: false | ShortcutManager | Partial<ShortcutManagerOptions>;
    statusline?: boolean;
    statusLine?: LegendStatusLineOptions;
    storage?: null | StorageLike;
    styleNonce?: string;
    symbol?: string;
    symbolSearch?: SymbolSearch;
    theme?: ChartTheme | WidgetThemeName;
    timeAxisHeight?: number;
    timeFormatter?: (utcSeconds: number, tickMark?: TickMarkType) => string;
    timeNavigator?: boolean | Partial<TimeNavigatorOptions>;
    timeScale?: Partial<TimeScaleOptions>;
    timezone?: string;
    topbar?: boolean;
    watermark?: boolean | ChartWatermarkOptions;
    zoomAnchor?: ZoomAnchor;
}

Hierarchy

Properties

animAutoscale?: boolean

Ease automatic price ranges during navigation. Defaults to animZoom (true).

animZoom?: boolean

Ease a wheel zoom over a few frames instead of landing the whole step on one. Default true, matching the inertial pan a flick already gets: a chart that glides when panned and jumps when zoomed reads as two different instruments. Off restores the single-frame step.

ariaLabel?: string

Accessible label for the chart container (screen readers).

axisChrome?: AxisChromeOptions

Optional chrome on the axis strips: the corner clock and the bar-close countdown. Both are off unless asked for, so a chart that omits this block draws the axes it always drew.

branding?: boolean | LogoWatermarkOptions

OpenAlgo corner mark by default. Pass false to hide it or options for custom branding.

canvas?: CanvasOptions

The settings dialog's Canvas block: grid, crosshair, scale text/lines and plot margins. Every field is an override of the theme, so a later setTheme still restyles anything the dialog did not touch.

chartType?: string

Primary series type. Default candlestick. Must be a registered chart type.

conflate?: boolean

Enable OHLC-preserving conflation when zoomed out (§4.4). Default false.

conflationFactor?: number

Conflation aggressiveness (default 1).

crosshairMode?: CrosshairMode

Crosshair behaviour. 'normal' (default) — the cross follows the pointer exactly. 'magnet' — the horizontal line snaps to the nearest O/H/L/C of the bar under the cursor (price pane only).

document?: Document
doubleClick?: DoubleClickAction

What a double-click on a pane does. 'reset' (the default, and what the chart has always done) fits every loaded bar on screen and autoscales, which also lands the viewport on the oldest bar and so wakes a history loader. 'maximize' gives the pane the whole stack, and a second double-click puts the stack back, which is what a multi-pane terminal usually wants from the gesture. 'none' only emits the event. While a tool is being placed a double-click finishes the shape whatever this says.

exchange?: string

Exchange passed to the feed with the symbol. Default ''.

feed?: DataFeed

Where bars come from. Without one the chart shows what the host sets on widget.series itself.

grid?: Partial<GridOptions>

Grid lines: visibility (both default to true) plus per-axis colour, dash, width and spacing. Unset colours/dashes fall through to the theme.

indicators?: boolean

Show the Indicators button. Default true.

interval?: string

Interval code the registry knows (a built-in token or one passed to registerInterval). Default 1d.

intervals?: readonly string[]

The interval pills, each a known code. Default: DEFAULT_INTERVALS plus every registered code.

legendOffset?: { left?: number; top?: number }

Where indicator legend rows start inside one pane, in media px. A host that draws its own overlay in a pane's top-left corner — an OHLC readout, a symbol line, a trade panel — needs to push these clear of it, or the rows land underneath and their settings / close buttons become invisible and unclickable.

It follows whichever pane currently renders at that corner, which is normally pane 0 — but maximizing a lower pane parks the others at a placeholder weight, so the maximized pane moves into the same corner and inherits the offset. Every other pane keeps the default corner, because a short lower pane would have its legend pushed off it entirely.

Defaults to { top: 6, left: 8 }.

Shared history, paging and recovery options. now here uses UTC seconds.

locale?: string

BCP 47 tag for the numbers on the status line. Default: the runtime's.

lookbackBars?: number

How many bars a load asks the feed for. Default DEFAULT_LOOKBACK_BARS.

mobile?: MobileMode

Narrow controls. Auto activates at 640 CSS px or less, or for a coarse primary pointer. Default auto.

navigation?: Partial<ChartNavigationOptions>

Saved navigation preferences, also exposed in the Axes settings tab.

now?: () => number

Clock for the load window and the capture filename. Default Date.now.

onOrder?: (order: OrderRequest) => void

Order entry from the right-click menu. Without it the menu draws no trade rows.

persist?: string | boolean

Keep the layout, the rail preferences, the symbol, the interval and the theme between visits. true uses one shared namespace; a string names one, so two widgets on a page keep separate layouts. Default off.

pixelRatio?: () => number
priceAxisWidth?: number
priceFormatter?: (price: number) => string

Custom price formatter for every pane's axis tick labels, the last-price tag, and price-line labels. e.g. (p) => '$' + p.toFixed(2). When omitted, a tick-size-aware toFixed is used. Change it later via setPriceFormatter.

priceScale?: Partial<PriceScaleOptions>

Default price-scale options applied to every pane (tick size minMove, mode: 'linear' | 'logarithmic' | 'percentage' | 'indexed-to-100', inverted, and top/bottom margins). minMove is the instrument's, so it lands only on panes that quote it, see setPriceScaleOptions. Tune a single pane later via chart.panes()[n].priceScale.setOptions(...).

raf?: { cancel?: RafCanceller; schedule: RafScheduler }
rail?: boolean | RailOptions

The drawing rail. false hides it; an object restricts its tools or seeds its pins. Default on.

renderBackend?: RenderBackendFactory

Build the backend directly, one call per pane, bypassing renderer and the registry. For a host bringing its own backend, and for tests that want to see what the pane asks a backend to paint. A factory that returns null gets the 2D backend for that pane.

renderer?: RendererChoice

Which backend paints the series. 'canvas2d' (the default) is the 2D path every chart has always drawn with. 'webgl2' asks for the GPU backend: it throws when the tier that registers it has not been imported (a missing import is a mistake in the code), and on a device where that tier finds no WebGL2 it falls back to canvas2d with one console warning (a property of the machine the host should still hear about). 'auto' takes webgl2 when it is registered and available on this device and canvas2d otherwise, silently. Decided once, at construction; read what was actually chosen from rendererKind. A GPU backend that loses its context later moves the chart to canvas2d for the rest of the session and emits 'renderer:fallback'.

shortcuts?: false | ShortcutManager | Partial<ShortcutManagerOptions>

Keyboard shortcuts. Pass a configured ShortcutManager, options to build one, or false to disable keyboard control. Defaults to the built-in keymap.

statusline?: boolean

Per-field status-line switches applied to every pane legend on the chart.

storage?: null | StorageLike

The store behind persist. Default: the page's localStorage.

styleNonce?: string

Host CSP nonce for the widget and dialog stylesheet, assigned before insertion.

symbol?: string
symbolSearch?: SymbolSearch

Symbol lookup for the top bar's box, called as the user types.

dark (default), light, or a full ChartTheme; the chrome derives its palette from it.

timeAxisHeight?: number
timeFormatter?: (utcSeconds: number, tickMark?: TickMarkType) => string

Custom time-axis and crosshair label formatter (receives UTC seconds). When omitted, labels use IST (Indian market default). e.g. for UTC: (s) => new Date(s * 1000).toISOString().slice(11, 16).

timeNavigator?: boolean | Partial<TimeNavigatorOptions>

Hover-revealed zoom / step controls above the time axis, as terminals show. true by default — they stay invisible until the pointer nears the bottom of the chart. Pass false to drop them, or an options object to restyle.

timeScale?: Partial<TimeScaleOptions>

Initial horizontal scale configuration, including spacing limits for wide profiles.

timezone?: string

IANA zone the time axis and crosshair label in, e.g. 'America/New_York' or 'Europe/London'. Defaults to 'Asia/Kolkata': a caller who passes nothing gets exactly the labels the chart produced before this option existed.

An IANA name and not a fixed offset, because a zone that observes DST is a different offset in July than in January and a fixed one is silently wrong for half the year. Change it at runtime with setTimezone when the terminal moves between an NSE symbol and a US one. An explicit timeFormatter outranks this: a host that formats its own labels has settled the question.

Throws if the runtime does not recognise the name.

topbar?: boolean
watermark?: boolean | ChartWatermarkOptions

Background text, off by default. Blank text follows setDataContext.

zoomAnchor?: ZoomAnchor

What a wheel zoom holds still: the bar under the cursor, or the right edge (the latest bar). Default 'cursor', which is what the chart has always done. 'right' keeps the most recent bar pinned while history stretches away from it, which is what a live chart usually wants.