Package io.jmix.charts.model.period
Class PeriodSelector
java.lang.Object
io.jmix.charts.model.AbstractChartObject
io.jmix.charts.model.period.PeriodSelector
- All Implemented Interfaces:
Serializable
Displays date input fields and predefined period buttons.
See documentation for properties of PeriodSelector JS object.
http://docs.amcharts.com/3/javascriptstockchart/PeriodSelector
See documentation for properties of PeriodSelector JS object.
http://docs.amcharts.com/3/javascriptstockchart/PeriodSelector
- See Also:
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionaddPeriods
(Period... periods) Adds periods.getWidth()
setDateFormat
(String dateFormat) Sets date format of date input fields.setFromText
(String fromText) Sets text displayed next to "from" date input field.setHideOutOfScopePeriods
(Boolean hideOutOfScopePeriods) Set hideOutOfScopePeriods to false if period buttons with date range bigger than available data shouldn't be hidden.setInputFieldsEnabled
(Boolean inputFieldsEnabled) Set inputFieldsEnabled to false if period selector shouldn't display "from" and "to" date input fields.setInputFieldWidth
(Integer inputFieldWidth) Sets width of date input fields, in pixels.setPeriods
(List<Period> periods) Sets list of predefined periods.setPeriodsText
(String periodsText) Sets text displayed next to predefined period buttons.setPosition
(Position position) Sets position.setSelectFromStart
(Boolean selectFromStart) Set selectFromStart to true if predefined period buttons should select a period from the beginning.Sets text displayed next to "to" date input field.Sets width of a period selector, when position is "left" or "right".
-
Constructor Details
-
PeriodSelector
public PeriodSelector()
-
-
Method Details
-
getDateFormat
- Returns:
- date format of date input fields
-
setDateFormat
Sets date format of date input fields. Note, only numeric date formats are allowed, so don't use "MMM" or "MMMM" month format, two-digit years "YY" is NOT supported in this setting. If not set the default value is "DD-MM-YYYY".- Parameters:
dateFormat
- date format string- Returns:
- period selector
-
getFromText
- Returns:
- from text
-
setFromText
Sets text displayed next to "from" date input field. If not set the default value is "From:".- Parameters:
fromText
- from text- Returns:
- period selector
-
getHideOutOfScopePeriods
- Returns:
- true if period buttons with date range bigger than available data are hidden
-
setHideOutOfScopePeriods
@StudioProperty(defaultValue="true") public PeriodSelector setHideOutOfScopePeriods(Boolean hideOutOfScopePeriods) Set hideOutOfScopePeriods to false if period buttons with date range bigger than available data shouldn't be hidden. If not set the default value is true.- Parameters:
hideOutOfScopePeriods
- hideOutOfScopePeriods option- Returns:
- period selector
-
getInputFieldsEnabled
- Returns:
- true if period selector displays "from" and "to" date input fields
-
setInputFieldsEnabled
@StudioProperty(defaultValue="true") public PeriodSelector setInputFieldsEnabled(Boolean inputFieldsEnabled) Set inputFieldsEnabled to false if period selector shouldn't display "from" and "to" date input fields. If not set the default value is true.- Parameters:
inputFieldsEnabled
- inputFieldsEnabled option- Returns:
- period selector
-
getInputFieldWidth
- Returns:
- width of date input fields, in pixels
-
setInputFieldWidth
@StudioProperty(defaultValue="100") public PeriodSelector setInputFieldWidth(Integer inputFieldWidth) Sets width of date input fields, in pixels. Works only if period selector is horizontal. If not set the default value is 100.- Parameters:
inputFieldWidth
- width- Returns:
- period selector
-
getPeriods
- Returns:
- list of periods
-
setPeriods
@StudioElementsGroup(caption="Periods", xmlElement="periods") public PeriodSelector setPeriods(List<Period> periods) Sets list of predefined periods.- Parameters:
periods
- list of periods- Returns:
- period selector
-
addPeriods
Adds periods.- Parameters:
periods
- periods- Returns:
- period selector
-
getPeriodsText
- Returns:
- text displayed next to predefined period buttons
-
setPeriodsText
Sets text displayed next to predefined period buttons. If not set the default value is "Zoom:".- Parameters:
periodsText
- periods text- Returns:
- period selector
-
getPosition
- Returns:
- position
-
setPosition
@StudioProperty(type=ENUMERATION, defaultValue="BOTTOM") public PeriodSelector setPosition(Position position) Sets position. If not set the default value is BOTTOM.- Parameters:
position
- position- Returns:
- period selector
-
getSelectFromStart
- Returns:
- true if predefined period buttons select a period from the beginning
-
setSelectFromStart
@StudioProperty(defaultValue="false") public PeriodSelector setSelectFromStart(Boolean selectFromStart) Set selectFromStart to true if predefined period buttons should select a period from the beginning. If not set the default value is false.- Parameters:
selectFromStart
- selectFromStart option- Returns:
- period selector
-
getToText
- Returns:
- text displayed next to "to" date input field
-
setToText
Sets text displayed next to "to" date input field. If not set the default value is "To:".- Parameters:
toText
- text- Returns:
- period selector
-
getWidth
- Returns:
- width of a period selector
-
setWidth
Sets width of a period selector, when position is "left" or "right". If not set the default value is 180.- Parameters:
width
- width- Returns:
- period selector
-