charton API / @chart-on/ui / index / IntervalsPresetOptions
Interface: IntervalsPresetOptions
Defined in: ui/src/toolbar-presets.ts:48
Options for the intervals preset: its id and label, button row or menu, the starting value, interval text, and how a picked interval is applied.
Properties
display?
optionaldisplay?:"menu"|"segmented"
Defined in: ui/src/toolbar-presets.ts:54
A row of buttons (default, collapses into a menu when narrow) or always a menu.
format?
optionalformat?: (interval) =>string
Defined in: ui/src/toolbar-presets.ts:62
Text for each interval. Default the interval itself, e.g. 15m, and for trade and volume intervals text in the chart's language, e.g. "100 trades" and "5K volume".
Parameters
interval
Returns
string
id?
optionalid?:string
Defined in: ui/src/toolbar-presets.ts:50
Default 'interval'.
label?
optionallabel?:string
Defined in: ui/src/toolbar-presets.ts:52
Accessible name. Default 'Interval'.
onChange?
optionalonChange?: (interval,chart) =>void
Defined in: ui/src/toolbar-presets.ts:67
Switch to the picked interval. Default: reload the data source's current symbol at it (chart.setSymbol); does nothing before the first setSymbol.
Parameters
interval
chart
Returns
void
value?
optionalvalue?:Interval
Defined in: ui/src/toolbar-presets.ts:56
Shown before the chart has loaded anything. Default the first entry.