Skip to content

charton API


charton API / @chart-on/ui / index / BottomBarOptions

Interface: BottomBarOptions ​

Defined in: ui/src/bottombar.ts:30

Shorthand for the bottom bar's default items (defaultBottomBarItems): range presets, the clock, go-to-date, price-scale controls, and the timezone, session and session-band controls. For any other layout, give the bar a list of items instead.

Properties ​

clock? ​

optional clock?: boolean

Defined in: ui/src/bottombar.ts:48

Show a clock in the chart's timezone. Default true. It is a button that opens the chart settings (settingsOf) on their Time section, or the timezones menu when the chart has no settings, and plain text when neither exists. Settings created after the bar take effect on refresh().


goToDate? ​

optional goToDate?: boolean

Defined in: ui/src/bottombar.ts:54

Show a go-to-date control after the range presets: a date and an optional time in the chart's timezone. Its go-to-date action has no default key; bind one with chart.actions.setKeys. Default true.


onRange? ​

optional onRange?: (range, chart) => void

Defined in: ui/src/bottombar.ts:41

Called before a range is applied, e.g. to switch to a fitting interval and reload data. The view change runs afterwards against the new data.

Parameters ​

range ​

RangeOption

chart ​

Chart

Returns ​

void


ranges? ​

optional ranges?: RangeOption[]

Defined in: ui/src/bottombar.ts:36

Range presets. None by default: the toolbar's interval control already sets how much history shows. Pass defaultRanges for 1D 5D 1M 3M 6M YTD 1Y 5Y All, or a list of your own.


scaleToggles? ​

optional scaleToggles?: boolean | "menu" | "inline"

Defined in: ui/src/bottombar.ts:62

The main pane's price scale controls: the scale mode (linear, log or percent) and auto-fit. 'menu' (the default; true too) puts them in one menu whose button shows the current mode, as they change rarely; 'inline' shows the modes as one radio group with the auto-fit toggle beside it; false leaves them out.


sessionBands? ​

optional sessionBands?: SessionBands

Defined in: ui/src/bottombar.ts:80

Session bands to list in a chip (see createSessionBands in core): a dot per lane, solid while it is open, and a list with countdowns to the next open or close. Attach the bands to the chart yourself to draw them.


sessions? ​

optional sessions?: object

Defined in: ui/src/bottombar.ts:74

Trading-session menu. Picking an option sets the chart's session and shades time outside it; an option without a session means always open.

options ​

options: SessionOption[]

value? ​

optional value?: string


timezones? ​

optional timezones?: object

Defined in: ui/src/bottombar.ts:69

Timezone menu next to the clock. Each option's value is an IANA zone or 'local'; picking one sets the chart's timezone. value is the initially selected option; the menu follows later changes made elsewhere (timezone:change), such as in the chart settings.

options ​

options: MenuOption[]

value? ​

optional value?: string