Package io.jmix.charts.model.dataset
Class DataSet
java.lang.Object
io.jmix.charts.model.AbstractChartObject
io.jmix.charts.model.dataset.DataSet
- All Implemented Interfaces:
Serializable
Holds all information about data.
See documentation for properties of DataSet JS object.
http://docs.amcharts.com/3/javascriptstockchart/DataSet
See documentation for properties of DataSet JS object.
http://docs.amcharts.com/3/javascriptstockchart/DataSet
- See Also:
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic class
static interface
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
addFieldMappings
(FieldMapping... fieldMappings) Adds field mappings.addStockEvents
(StockEvent... stockEvents) Adds stock events.protected void
getColor()
getId()
getTitle()
void
setCategoryField
(String categoryField) Sets category field name in your data provider.Sets color of the data set.setCompared
(Boolean compared) Set to true if this data set selected for comparing.setDataProvider
(DataProvider dataProvider) Sets data provider to the data set.setFieldMappings
(List<FieldMapping> fieldMappings) Sets list of field mappings.setShowInCompare
(Boolean showInCompare) Set showInCompare to false if this data set shouldn't be visible in "compare to" list.setShowInSelect
(Boolean showInSelect) Set showInSelect to false if this data set shouldn't be visible in "select" dropdown.setStockEvents
(List<StockEvent> stockEvents) Sets list of stock events.Sets data set title.
-
Constructor Details
-
DataSet
public DataSet()
-
-
Method Details
-
getId
-
setId
-
getCategoryField
- Returns:
- category field name
-
setCategoryField
Sets category field name in your data provider. It needs to contains a date/time value. If you are specifying dates as strings in your data, i.e. "2015-01-05", it is strongly recommend setting dataDateFormat as well.- Parameters:
categoryField
- category field name- Returns:
- data set
-
getColor
- Returns:
- color of the data set
-
setColor
Sets color of the data set. One of colors fromcolors
array will be used if not set.- Parameters:
color
- color- Returns:
- data set
-
getCompared
- Returns:
- true if data set is selected for comparing
-
setCompared
Set to true if this data set selected for comparing. If not set the default value is false.- Parameters:
compared
- compared option- Returns:
- data set
-
getDataProvider
- Returns:
- data provider
-
setDataProvider
@StudioProperty(name="dataContainer", type=DATACONTAINER_REF) public DataSet setDataProvider(DataProvider dataProvider) Sets data provider to the data set. An array of data points to be used as data. Important, the data points needs to come pre-ordered in ascending order. Data with incorrect order might result in visual and functional glitches on the chart.- Parameters:
dataProvider
- data provider- Returns:
- data set
-
fireDataProviderChanged
protected void fireDataProviderChanged() -
getFieldMappings
- Returns:
- list of field mappings
-
setFieldMappings
@StudioElementsGroup(caption="Field Mappings", xmlElement="fieldMappings") public DataSet setFieldMappings(List<FieldMapping> fieldMappings) Sets list of field mappings. Field mapping is an object with fromField and toField properties. fromField is a name of your value field in data provider. toField might be chosen freely, it will be used to set value/open/close/high/low fields for theStockGraph
.- Parameters:
fieldMappings
- list of field mappings- Returns:
- data set
-
addFieldMappings
Adds field mappings.- Parameters:
fieldMappings
- field mappings- Returns:
- data set
-
getShowInCompare
- Returns:
- true if this data set is visible in "compare to" list
-
setShowInCompare
Set showInCompare to false if this data set shouldn't be visible in "compare to" list. If not set the default value is true.- Parameters:
showInCompare
- showInCompare option- Returns:
- data set
-
getShowInSelect
- Returns:
- true if this data set is visible in "select" dropdown
-
setShowInSelect
Set showInSelect to false if this data set shouldn't be visible in "select" dropdown. If not set the default value is true.- Parameters:
showInSelect
- showInSelect option- Returns:
- data set
-
getStockEvents
- Returns:
- list of stock events
-
setStockEvents
@StudioElementsGroup(caption="Stock Events", xmlElement="stockEvents") public DataSet setStockEvents(List<StockEvent> stockEvents) Sets list of stock events.- Parameters:
stockEvents
- list of stock events- Returns:
- data set
-
addStockEvents
Adds stock events.- Parameters:
stockEvents
- stock events- Returns:
- data set
-
getTitle
- Returns:
- data set title
-
setTitle
Sets data set title.- Parameters:
title
- title- Returns:
- data set
-
getWiredFields
- Returns:
- fields that are bound to the data set
-
addDataProviderChangeListener
-
removeDataProviderChangeListener
-