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?
optionalclock?: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?
optionalgoToDate?: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?
optionalonRange?: (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
chart
Returns
void
ranges?
optionalranges?: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?
optionalscaleToggles?: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?
optionalsessionBands?: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?
optionalsessions?: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?
optionalvalue?:string
timezones?
optionaltimezones?: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?
optionalvalue?:string