The widget options the bottom bar and the session calendar read.

interface WidgetOptions {
    account?: AccountStateSource;
    animAutoscale?: boolean;
    animZoom?: boolean;
    ariaLabel?: string;
    axisChrome?: AxisChromeOptions;
    barsProvider?: IndicatorBarsProviderAccess | IndicatorBarsProvider;
    bottombar?: boolean;
    branding?: boolean | LogoWatermarkOptions;
    canSelectInterval?: (code: string) => boolean;
    canvas?: CanvasOptions;
    captureRows?: () => readonly (string | MenuRow)[];
    chartType?: string;
    conflate?: boolean;
    conflationFactor?: number;
    crosshairMode?: CrosshairMode;
    crosshairSnapToBar?: boolean;
    document?: Document;
    doubleClick?: DoubleClickAction;
    drawingScope?: "chart" | "instrument";
    drawingStore?: DrawingDocumentStore;
    drawingTemplates?: DrawingTemplateStore;
    drawingToolbar?: boolean;
    eventDetails?: false | EventDetailsPopupOptions;
    exchange?: string;
    feed?: DataFeed;
    grid?: Partial<GridOptions>;
    indicatorLegendCollapsed?: boolean;
    indicators?: boolean;
    interval?: string;
    intervals?: readonly string[];
    keyboardRoute?: () => undefined | boolean;
    layouts?: false | LayoutsController;
    legendIconSize?: number;
    legendOffset?: { left?: number; top?: number };
    loading?: DataLoadingOptions;
    locale?: string;
    lookbackBars?: number;
    mobile?: MobileMode;
    movablePrimaryPane?: boolean;
    navigation?: Partial<ChartNavigationOptions>;
    news?: NewsPanelOptions;
    now?: () => number;
    onOrder?: (order: OrderRequest) => void;
    panels?: boolean;
    persist?: string | boolean;
    pixelRatio?: () => number;
    priceAxisWidth?: number;
    priceFormatter?: (price: number) => string;
    priceOnlyAutoScale?: boolean;
    priceScale?: Partial<PriceScaleOptions>;
    raf?: { cancel?: RafCanceller; schedule: RafScheduler };
    rail?: boolean | RailOptions;
    ranges?: readonly WidgetRange[];
    renderBackend?: RenderBackendFactory;
    renderer?: RendererChoice;
    sessionCalendar?: WidgetSessionCalendar;
    sessionShading?: boolean;
    shortcuts?: false | ShortcutManager | Partial<ShortcutManagerOptions>;
    shortcutsEditor?: boolean;
    statusline?: boolean;
    statusLine?: LegendStatusLineOptions;
    storage?: null | StorageLike | AsyncStorageLike;
    styleNonce?: string;
    symbol?: string;
    symbolSearch?: SymbolSearch;
    theme?: ChartTheme | WidgetThemeName;
    timeAxisHeight?: number;
    timeFormatter?: (utcSeconds: number, tickMark?: TickMarkType) => string;
    timeframePreferences?: TimeframePreferences;
    timeNavigator?: boolean | Partial<TimeNavigatorOptions>;
    timeScale?: Partial<TimeScaleOptions>;
    timezone?: string;
    topbar?: boolean;
    tradingCapabilities?: TradingCapabilitySource;
    tradingLocked?: () => boolean;
    tradingMode?: "live" | "analyzer";
    translate?: WidgetTranslator;
    typingNavigation?: boolean;
    variant?: DataVariant;
    watchlist?: WidgetWatchlistOptions;
    watermark?: boolean | ChartWatermarkOptions;
    workspaces?: WorkspaceStore;
    zoomAnchor?: ZoomAnchor;
}

Hierarchy (View Summary)

Properties

Account state for the status line, usually a trade-tier AccountManager. Omitted shows no account; a source whose provider declares no accounts is shown disabled with the reason. It only reads and switches accounts.

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.

Where an indicator gets another instrument's bars. The engine is handed one symbol's history and owns no transport, so a study that compares against a benchmark asks through this and the host answers from wherever it keeps candles. Change it later with setBarsProvider. Without one an indicator's requestBars rejects, and the study reports itself unsupported rather than drawing something invented.

bottombar?: boolean

The strip under the chart: preset ranges and Go to on the left, the market status, a clock that opens the timezone choice and the price scale toggles on the right. The phone layout hides it and lists its controls in the More sheet. Default true.

branding?: boolean | LogoWatermarkOptions

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

canSelectInterval?: (code: string) => boolean

Host capability validation, including derivable intervals.

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.

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

More rows at the end of the capture menu, read each time it opens; a string starts a group. The chart grid adds its whole-grid capture here.

chartType?: string

Primary chart type. Default candlestick. A registered renderer, or a transform the chart applies (registeredSeriesTransforms, once the transform tier is imported).

conflate?: boolean

Level of detail for a zoomed-out chart (§4.4). Default true: once bars are narrower than the stick a candle is drawn with (about one CSS px; exactly one at a whole pixel ratio), the bars sharing a device-pixel column are drawn as one OHLC-preserving stick (open of the first, close of the last, the column's high and low), and line and histogram series keep each column's first, lowest, highest and last values. A frame then costs the plot's width, not the number of bars in view. Above that spacing nothing changes. Data, autoscale, indicators and the crosshair still see every bar. false draws every bar at every zoom.

The default time scale never zooms out past one bar per CSS px (timeScale.minBarSpacing: 1), so it matters once a host lowers that floor.

conflationFactor?: number

Column width in sticks (default 1). Higher merges into wider columns, and from spacings that many times wider, for a coarser, cheaper picture.

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).

crosshairSnapToBar?: boolean

Snap the vertical crosshair to the nearest primary bar's center. Default false; independent of the price magnet.

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.

drawingScope?: "chart" | "instrument"

Whose drawings the chart shows. 'instrument' (default): each symbol and exchange keeps its own, saved when the chart moves to another instrument and brought back when it returns, which is what a trader drawing levels expects. 'chart': one drawing set that stays on screen whatever instrument is loaded, as earlier releases did, for a host that wants drawings to follow the chart.

drawingStore?: DrawingDocumentStore

Where the drawings of each instrument are kept in 'instrument' scope. Default: beside the layout in storage when persist is on (DRAWINGS_KEY_PREFIX), else in memory for the life of the widget.

drawingTemplates?: DrawingTemplateStore

Saved drawing looks, a tool's default and named templates: a DrawingTemplateRepository from openalgo-charts/workspace.

drawingToolbar?: boolean

The floating toolbar over the selected drawings on a desktop layout. Default: shown with the rail.

eventDetails?: false | EventDetailsPopupOptions

Event marker clicks open details. Set false to provide a host-owned view.

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.

indicatorLegendCollapsed?: boolean

Collapse study legend rows into a count without hiding their plots or stopping calculations. Default false.

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[]

Offered intervals, each a known code. Default: DEFAULT_INTERVALS plus every registered code. Favorites and the current interval appear as pills.

keyboardRoute?: () => undefined | boolean

Which widget answers the keyboard when a host shows several. True sends chords here as if the chart had focus, false silences this widget and its chart's shortcuts, and undefined leaves the pointer and the focus to decide, as they do for a lone widget. The chart grid supplies it per cell.

layouts?: false | LayoutsController

What the Layouts menu drives: default a controller over this widget; false for no menu. A chart grid decides what its charts get (ChartGridOptions.layouts).

legendIconSize?: number

Square side of a legend action button in media px. Default 16, held to 12..28. Applied to every pane legend, because the rows stack against it.

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 the primary price pane, which is at the top until something moves it below its studies: a readout of the price belongs to the price pane, wherever it sits. Maximizing a study pane hides the price pane, so the maximized pane, now in the same corner, inherits the offset. Every other pane keeps the default corner, because a short study 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 when the container is at most 640 CSS px wide, or, with a coarse primary pointer, at most 960 px wide and under 600 px tall (a phone on its side); a tablet or a touch laptop keeps the desktop chrome. Default auto.

movablePrimaryPane?: boolean

Let the primary price pane leave the top of the stack: below its studies through movePane, setPrimaryPaneIndex, a study pane's own up and down controls, or a restored layout that saved it lower down. Default false, which keeps the price pane pinned at slot 0 exactly as every earlier release did: movePane refuses to move or displace it, setPrimaryPaneIndex returns false, and restoreState refuses a layout that puts it anywhere else, so an explicit pane 0 always means the price.

Opt-in because a host that passes 0 to mean the price pane (a price or order line, coordinateToPrice(y, 0) pricing a right-click order, a price alert check, panes()[0]) would read a study's units the moment a user moved a study above the candles. Before turning it on, drop those explicit zeros or ask primaryPaneIndex(), and follow paneMoved. Decided once, at construction; read it back with movablePrimaryPane(). createWidget and createChartGrid hand it to their charts as given, off by default too.

navigation?: Partial<ChartNavigationOptions>

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

A docked reader for the chart instrument's news. Needs panels.

now?: () => number

The widget's wall clock, in epoch milliseconds: the history load window, the loading controller's clock (unless loading.now gives it one, in UTC seconds), the status line and the bottom bar's clock and ranges. Default Date.now. It shadows ChartOptions.now, the chart's animation clock (monotonic, performance.now by default), which the widget does not pass to its chart: its kinetic animation runs on the real clock.

onOrder?: (order: OrderRequest) => void

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

panels?: boolean

Docked Data and Objects panels. False retains the original Objects dialog. Default true.

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.

priceOnlyAutoScale?: boolean

Fit the primary series' scale to that series only. Does not enable auto-fit. Default false.

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 }

The frame scheduler, for deterministic tests. Supplied, it runs every frame the chart paints, the one after a resize or a new pixel ratio included; with the default one the chart paints those inside the callback that reports them, so a resize never shows a cleared canvas.

rail?: boolean | RailOptions

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

ranges?: readonly WidgetRange[]

Preset ranges for the bar and setRange. [] leaves the range buttons out. Default DEFAULT_RANGES.

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'.

sessionCalendar?: WidgetSessionCalendar

Trading hours, applied with chart.setSessionCalendar for the first symbol and on every symbol change. They size a range's fetch in sessions, give the bar its market status and the shading its hours. Default: the widget leaves the chart's calendar to the host.

sessionShading?: boolean

Shade the pre-open, post-close and extended-hours bars from the chart's calendar (attachSessionShading). A calendar without those hours, or no calendar, shades nothing. Default true.

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.

shortcutsEditor?: boolean

The ? panel lets the user change the widget's and the chart's chords, kept in storage when persist is on. False lists them only and applies no saved chords. Default true.

statusline?: boolean

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

storage?: null | StorageLike | AsyncStorageLike

The store behind persist. Default: IndexedDB where the page has it (since 2.5.10), else the page's localStorage. Over an asynchronous store (one with entries, such as createIndexedDbWidgetStorage) the saved layout lands when ready settles; a synchronous one, such as localStorage passed here, applies it before createWidget returns.

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. Default: the feed's searchSymbols, when it has one.

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 follow timezone, which is IST unless set. e.g. for UTC: (s) => new Date(s * 1000).toISOString().slice(11, 16).

timeframePreferences?: TimeframePreferences

Share favorites and custom choices across host-owned chart panes.

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
tradingCapabilities?: TradingCapabilitySource

Supported host order routes, optionally resolved again for each request.

tradingLocked?: () => boolean

Locks order entry during host replay selection or workspace transitions.

tradingMode?: "live" | "analyzer"

The requested execution mode when the host capabilities constrain it.

translate?: WidgetTranslator

Host translations for widget chrome and dialogs, with English fallback.

typingNavigation?: boolean

Unclaimed letters and digits open symbol and interval entry on the focused chart. Default true.

variant?: DataVariant

Which of the feed's series to show: a session, an adjustment, a currency or a unit. Default: the feed's own default series. The feed must declare it through dataVariants, or the chart reports it unsupported.

A docked watchlist: named lists from a store (a WatchlistRepository from openalgo-charts/workspace), with prices only from quotes. Needs panels.

watermark?: boolean | ChartWatermarkOptions

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

workspaces?: WorkspaceStore

Saved layouts and indicator templates: a WorkspaceRepository from openalgo-charts/workspace, or a host's own WorkspaceStore. It adds the Layouts menu (top bar, and the More sheet on a phone) and templates in the indicator picker, and reopens the layout that was active when the page last closed. Taken as a type only: the workspace tier loads with the store.

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.