Type class
PeriodSelector displays date input fields and predefined period buttons.
Inheritance
PeriodSelector does not extend any other symbol.
PeriodSelector is not extended by any other symbol.
Properties
dateFormat # |
Type Default Date format of date input fields. Check this page for possible codes. Note, only numeric date formats are allowed, so don't use MMM or MMMM month format. Please note that two-digit years (YY) is NOT supported in this setting. |
---|---|
fromText # |
Type Default Text displayed next to "from" date input field. |
hideOutOfScopePeriods # |
Type Default Specifies if period buttons with date range bigger than available data should be hidden. |
inputFieldsEnabled # |
Type Default Specifies whether period selector displays "from" and "to" date input fields. |
inputFieldWidth # |
Type Default Width of date input fields, in pixels. Works only if period selector is horizontal. |
listeners # |
Type You can add listeners of events using this property. Example: listeners = [{"event":"changed", "method":handleEvent}]; |
periodsText # |
Type Default Text displayed next to predefined period buttons. |
position # |
Type Default Possible values: "right", "left", "top", "bottom". |
selectFromStart # |
Type Default Specifies whether predefined period buttons should select a period from the beginning or the end of the data. |
toText # |
Type Default Text displayed next to "to" date input field. |
width # |
Type Default Width of a period selector, when position is "left" or "right". |
Methods
addListener( |
Returns type - string like 'changed' (listed in 'events' section of this class). handler - function which is called when event happens |
---|---|
removeListener( |
Returns |
setDefaultPeriod() |
Returns Resets the chart zoom to whatever default PeriodSelector button is. Can be used to simulate a click on period buttons buy changing "selected" property of PeriodSelector.periods items. |
Events
#changed |
Param Dispatched when dates in period selector input fields are changed or user clicks on one of the predefined period buttons. |
---|
Adapters
PeriodSelector does not have any adapters.