Package io.jmix.charts.model.chart.impl
Class StockChartGroup
java.lang.Object
io.jmix.charts.model.AbstractChartObject
io.jmix.charts.model.chart.impl.ChartModelImpl
io.jmix.charts.model.chart.impl.StockChartGroup
- All Implemented Interfaces:
StockChartModel<StockChartGroup>,DataSet.DataProviderChangeListener,HasColors<StockChartGroup>,Serializable
public class StockChartGroup
extends ChartModelImpl
implements StockChartModel<StockChartGroup>, HasColors<StockChartGroup>, DataSet.DataProviderChangeListener
See documentation for properties of AmStockChart JS object.
http://docs.amcharts.com/3/javascriptstockchart/AmStockChart
http://docs.amcharts.com/3/javascriptstockchart/AmStockChart
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classstatic interfacestatic classstatic interfacestatic enum -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionAdds colors.addComparedDataSets(String... comparedDataSets) Adds compared data sets.voidaddDataSets(DataSet... dataSets) Adds data sets.voidaddPanels(StockPanel... panels) Adds stock panels.protected voidfireDataSetsChanged(List<DataSet> dataSets, StockChartGroup.Operation operation) getDataSet(String id) Gets data set by id.getPath()getTheme()getType()voidvoidvoidsetAddClassNames(Boolean addClassNames) Set addClassNames to true, if class names should be added to chart elements.setAdditionalFields(List<String> additionalFields) Sets list of additional fields.setAnimationPlayed(Boolean animationPlayed) Specifies if animation was already played.setAutoResize(Boolean autoResize) Set autoResize to true if you want chart to resize itself whenever its parent container size changes.setBalloon(Balloon balloon) Sets the balloon.setCategoryAxesSettings(CategoryAxesSettings categoryAxesSettings) Sets settings for category axes.setChartCursorSettings(ChartCursorSettings chartCursorSettings) Sets chart cursor settings.setChartScrollbarSettings(ChartScrollbarSettings chartScrollbarSettings) Sets chart scrollbar settings.setClassNamePrefix(String classNamePrefix) Sets the class name prefix.Sets the list of colors.setComparedDataSets(List<String> comparedDataSets) Sets the list of of data sets selected for comparing.setDataDateFormat(String dataDateFormat) Sets data date format.setDataSets(List<DataSet> dataSets) Sets the list of data sets.setDataSetSelector(DataSetSelector dataSetSelector) Sets data set selector.Sets the export menu.setExtendToFullPeriod(Boolean extendToFullPeriod) Specifies if the chart should always display full first and last data item when data is grouped to a longer period if the chart is zoomed from the beginning or end of the data.setFirstDayOfWeek(Integer firstDayOfWeek) Sets day week starts.setGlueToTheEnd(Boolean glueToTheEnd) Set glueToTheEnd to true if the scope of the data view should be set to the end after data update.setLanguage(String language) Sets language of default.setLegendSettings(LegendSettings legendSettings) Sets legend settings.setMainDataSet(String mainDataSet) Sets data set as main.setMouseWheelScrollEnabled(Boolean mouseWheelScrollEnabled) Set mouseWheelScrollEnabled to true you wont to scroll chart with mouse wheel.setPanels(List<StockPanel> panels) Sets list of stock panels.setPanelsSettings(PanelsSettings panelsSettings) Sets settings for stock panels.Specifies absolute or relative path to amCharts files.setPathToImages(String pathToImages) Specifies path to the folder where images like resize grips, lens and similar are.setPeriodSelector(PeriodSelector periodSelector) Sets period selector.setProcessTimeout(Integer processTimeout) Sets the process timeout.setStockEventsSettings(StockEventsSettings stockEventsSettings) Sets settings for stock events.setTheme(ChartTheme theme) Sets theme of a chart.setValueAxesSettings(ValueAxesSettings valueAxesSettings) Sets settings for value axes.setZoomOutOnDataSetChange(Boolean zoomOutOnDataSetChange) Specifies whether the chart should zoom-out when main data set is changed.
-
Constructor Details
-
StockChartGroup
public StockChartGroup()
-
-
Method Details
-
getAddClassNames
- Specified by:
getAddClassNamesin interfaceStockChartModel<StockChartGroup>- Returns:
- true if addClassNames option is enabled
-
setAddClassNames
Description copied from interface:StockChartModelSet addClassNames to true, if class names should be added to chart elements.- Specified by:
setAddClassNamesin interfaceStockChartModel<StockChartGroup>- Parameters:
addClassNames- add class names option- Returns:
- stock chart model
-
getExport
- Specified by:
getExportin interfaceStockChartModel<StockChartGroup>- Returns:
- export menu
-
setExport
Description copied from interface:StockChartModelSets the export menu.- Specified by:
setExportin interfaceStockChartModel<StockChartGroup>- Parameters:
export- export menu- Returns:
- stock chart model
-
getAnimationPlayed
- Specified by:
getAnimationPlayedin interfaceStockChartModel<StockChartGroup>- Returns:
- true if animation was already played
-
setAnimationPlayed
Description copied from interface:StockChartModelSpecifies if animation was already played. Animation is only played once, when chart is rendered for the first time. If you want the animation to be repeated, set this property to false.- Specified by:
setAnimationPlayedin interfaceStockChartModel<StockChartGroup>- Parameters:
animationPlayed- animation played option- Returns:
- stock chart model
-
getAutoResize
- Specified by:
getAutoResizein interfaceStockChartModel<StockChartGroup>- Returns:
- true if autoResize is enabled
-
setAutoResize
Description copied from interface:StockChartModelSet autoResize to true if you want chart to resize itself whenever its parent container size changes. If not set the default value is true.- Specified by:
setAutoResizein interfaceStockChartModel<StockChartGroup>- Parameters:
autoResize- auto resize option- Returns:
- stock chart model
-
getBalloon
- Specified by:
getBalloonin interfaceStockChartModel<StockChartGroup>- Returns:
- balloon
-
setBalloon
Description copied from interface:StockChartModelSets the balloon.- Specified by:
setBalloonin interfaceStockChartModel<StockChartGroup>- Parameters:
balloon- the balloon- Returns:
- stock chart model
-
getCategoryAxesSettings
- Specified by:
getCategoryAxesSettingsin interfaceStockChartModel<StockChartGroup>- Returns:
- category axis settings
-
setCategoryAxesSettings
Description copied from interface:StockChartModelSets settings for category axes.- Specified by:
setCategoryAxesSettingsin interfaceStockChartModel<StockChartGroup>- Parameters:
categoryAxesSettings- category axis settings- Returns:
- stock chart model
-
getChartCursorSettings
- Specified by:
getChartCursorSettingsin interfaceStockChartModel<StockChartGroup>- Returns:
- chart cursor settings
-
setChartCursorSettings
Description copied from interface:StockChartModelSets chart cursor settings.- Specified by:
setChartCursorSettingsin interfaceStockChartModel<StockChartGroup>- Parameters:
chartCursorSettings- chart cursor settings- Returns:
- stock chart model
-
getChartScrollbarSettings
- Specified by:
getChartScrollbarSettingsin interfaceStockChartModel<StockChartGroup>
-
setChartScrollbarSettings
Description copied from interface:StockChartModelSets chart scrollbar settings.- Specified by:
setChartScrollbarSettingsin interfaceStockChartModel<StockChartGroup>- Parameters:
chartScrollbarSettings- chart scrollbar settings- Returns:
- stock chart model
-
getClassNamePrefix
- Specified by:
getClassNamePrefixin interfaceStockChartModel<StockChartGroup>- Returns:
- class name prefix
-
setClassNamePrefix
Description copied from interface:StockChartModelSets the class name prefix. This prefix is added to all class names which are added to all visual elements of a chart in case addClassNames is set to true. If not set the default value is "amcharts".- Specified by:
setClassNamePrefixin interfaceStockChartModel<StockChartGroup>- Parameters:
classNamePrefix- class name prefix string- Returns:
- stock chart model
-
getColors
- Specified by:
getColorsin interfaceHasColors<StockChartGroup>- Returns:
- List of colors
-
setColors
Description copied from interface:HasColorsSets the list of colors.If you use charts based on
SlicedChartModelImplit specifies the colors of the slices, if the slice color is not set. If there are more slices than colors in this array, the chart picks random color.If you use charts based on
CoordinateChartModelImplorStockChartModelit specifies the colors of the graphs if the lineColor of a graph is not set. If there are more graphs then colors in this array, the chart picks a random color. If not set the default value is["#FF6600", "#FCD202", "#B0DE09", "#0D8ECF", "#2A0CD0", "#CD0D74", "#CC0000", "#00CC00", "#0000CC", "#DDDDDD", "#999999", "#333333", "#990000"]If you use chart based on
SlicedChartModelImpl(PieChart, FunnelChart). Specifies the colors of the slices, if the slice color is not set. If there are more slices than colors in this array, the chart picks random color. If not set default value is["#FF0F00", "#FF6600", "#FF9E01", "#FCD202", "#F8FF01", "#B0DE09", "#04D215", "#0D8ECF", "#0D52D1", "#2A0CD0", "#8A0CCF", "#CD0D74", "#754DEB", "#DDDDDD", "#999999", "#333333", "#000000", "#57032A", "#CA9726", "#990000", "#4B0C25"]- Specified by:
setColorsin interfaceHasColors<StockChartGroup>- Parameters:
colors- list of colors- Returns:
- chart
-
addColors
Description copied from interface:HasColorsAdds colors.- Specified by:
addColorsin interfaceHasColors<StockChartGroup>- Parameters:
colors- list of colors- Returns:
- chart
-
getComparedDataSets
- Specified by:
getComparedDataSetsin interfaceStockChartModel<StockChartGroup>- Returns:
- list of compared data sets
-
setComparedDataSets
Description copied from interface:StockChartModelSets the list of of data sets selected for comparing.- Specified by:
setComparedDataSetsin interfaceStockChartModel<StockChartGroup>- Parameters:
comparedDataSets- compared data sets- Returns:
- stock chart model
-
addComparedDataSets
Description copied from interface:StockChartModelAdds compared data sets.- Specified by:
addComparedDataSetsin interfaceStockChartModel<StockChartGroup>- Parameters:
comparedDataSets- compared data sets- Returns:
- stock chart model
-
getDataDateFormat
- Specified by:
getDataDateFormatin interfaceStockChartModel<StockChartGroup>- Returns:
- data date format
-
setDataDateFormat
Description copied from interface:StockChartModelSets data date format. Please note, that two-digit years "YY" is NOT supported in this setting.- Specified by:
setDataDateFormatin interfaceStockChartModel<StockChartGroup>- Parameters:
dataDateFormat- data date format string- Returns:
- stock chart model
-
getDataSets
- Specified by:
getDataSetsin interfaceStockChartModel<StockChartGroup>- Returns:
- list of data sets
-
setDataSets
Description copied from interface:StockChartModelSets the list of data sets.- Specified by:
setDataSetsin interfaceStockChartModel<StockChartGroup>- Parameters:
dataSets- list of data sets- Returns:
- stock chart model
-
addDataSets
Description copied from interface:StockChartModelAdds data sets.- Specified by:
addDataSetsin interfaceStockChartModel<StockChartGroup>- Parameters:
dataSets- data sets- Returns:
- stock chart model
-
fireDataSetsChanged
-
getDataSetSelector
- Specified by:
getDataSetSelectorin interfaceStockChartModel<StockChartGroup>- Returns:
- data set selector
-
setDataSetSelector
Description copied from interface:StockChartModelSets data set selector. You can add it if you have more than one data set and want users to be able to select/compare them.- Specified by:
setDataSetSelectorin interfaceStockChartModel<StockChartGroup>- Parameters:
dataSetSelector- data set selector- Returns:
- stock chart model
-
getExtendToFullPeriod
- Specified by:
getExtendToFullPeriodin interfaceStockChartModel<StockChartGroup>- Returns:
- true if chart always displays full first and last data item when data is grouped to a longer period if the chart is zoomed from the beginning or end of the data
-
setExtendToFullPeriod
Description copied from interface:StockChartModelSpecifies if the chart should always display full first and last data item when data is grouped to a longer period if the chart is zoomed from the beginning or end of the data. If not set the default value is true.- Specified by:
setExtendToFullPeriodin interfaceStockChartModel<StockChartGroup>- Parameters:
extendToFullPeriod- extend to full period option- Returns:
- stock chart model
-
getFirstDayOfWeek
- Specified by:
getFirstDayOfWeekin interfaceStockChartModel<StockChartGroup>- Returns:
- first day of week
-
setFirstDayOfWeek
Description copied from interface:StockChartModelSets day week starts. 0 - Sunday, 1 - Monday etc. If not set the default value is 1.- Specified by:
setFirstDayOfWeekin interfaceStockChartModel<StockChartGroup>- Parameters:
firstDayOfWeek- first day of week- Returns:
- stock chart model
-
getGlueToTheEnd
- Specified by:
getGlueToTheEndin interfaceStockChartModel<StockChartGroup>- Returns:
- true if the scope of the data view is set to the end after data update
-
setGlueToTheEnd
Description copied from interface:StockChartModelSet glueToTheEnd to true if the scope of the data view should be set to the end after data update. If not set the default value is false.- Specified by:
setGlueToTheEndin interfaceStockChartModel<StockChartGroup>- Parameters:
glueToTheEnd- glue to the end option- Returns:
- stock chart model
-
getLanguage
- Specified by:
getLanguagein interfaceStockChartModel<StockChartGroup>- Returns:
- language
-
setLanguage
Description copied from interface:StockChartModelSets language of default. Note, you should include language js file from amcharts/lang and then use variable name used in this file, likesetLanguage("de").- Specified by:
setLanguagein interfaceStockChartModel<StockChartGroup>- Parameters:
language- language string- Returns:
- stock chart model
-
getLegendSettings
- Specified by:
getLegendSettingsin interfaceStockChartModel<StockChartGroup>- Returns:
- legend settings
-
setLegendSettings
Description copied from interface:StockChartModelSets legend settings.- Specified by:
setLegendSettingsin interfaceStockChartModel<StockChartGroup>- Parameters:
legendSettings- legend settings- Returns:
- stock chart model
-
getMainDataSet
- Specified by:
getMainDataSetin interfaceStockChartModel<StockChartGroup>- Returns:
- main data set
-
setMainDataSet
Description copied from interface:StockChartModelSets data set as main.- Specified by:
setMainDataSetin interfaceStockChartModel<StockChartGroup>- Parameters:
mainDataSet- main data set- Returns:
- stock chart model
-
getMouseWheelScrollEnabled
- Specified by:
getMouseWheelScrollEnabledin interfaceStockChartModel<StockChartGroup>- Returns:
- true if scrolling of a chart with mouse wheel is enabled
-
setMouseWheelScrollEnabled
Description copied from interface:StockChartModelSet mouseWheelScrollEnabled to true you wont to scroll chart with mouse wheel. If not set the default value is false.- Specified by:
setMouseWheelScrollEnabledin interfaceStockChartModel<StockChartGroup>- Parameters:
mouseWheelScrollEnabled- mouse wheel scroll option- Returns:
- stock chart model
-
getPanels
- Specified by:
getPanelsin interfaceStockChartModel<StockChartGroup>- Returns:
- list of stock panels
-
setPanels
Description copied from interface:StockChartModelSets list of stock panels.- Specified by:
setPanelsin interfaceStockChartModel<StockChartGroup>- Parameters:
panels- list of stock panels- Returns:
- stock chart model
-
addPanels
Description copied from interface:StockChartModelAdds stock panels.- Specified by:
addPanelsin interfaceStockChartModel<StockChartGroup>- Parameters:
panels- stock panels- Returns:
- stock chart model
-
getPanelsSettings
- Specified by:
getPanelsSettingsin interfaceStockChartModel<StockChartGroup>- Returns:
- panel settings
-
setPanelsSettings
Description copied from interface:StockChartModelSets settings for stock panels.- Specified by:
setPanelsSettingsin interfaceStockChartModel<StockChartGroup>- Parameters:
panelsSettings- panel settings- Returns:
- stock chart model
-
getPath
- Specified by:
getPathin interfaceStockChartModel<StockChartGroup>- Returns:
- path
-
setPath
Description copied from interface:StockChartModelSpecifies absolute or relative path to amCharts files.- Specified by:
setPathin interfaceStockChartModel<StockChartGroup>- Parameters:
path- the path string- Returns:
- stock chart model
-
getPathToImages
- Specified by:
getPathToImagesin interfaceStockChartModel<StockChartGroup>
-
setPathToImages
Description copied from interface:StockChartModelSpecifies path to the folder where images like resize grips, lens and similar are.- Specified by:
setPathToImagesin interfaceStockChartModel<StockChartGroup>- Parameters:
pathToImages- path to images- Returns:
- stock chart model
-
getPeriodSelector
- Specified by:
getPeriodSelectorin interfaceStockChartModel<StockChartGroup>- Returns:
- period selector
-
setPeriodSelector
Description copied from interface:StockChartModelSets period selector. You can add it if you want user's to be able to enter date ranges or zoom chart with predefined period buttons.- Specified by:
setPeriodSelectorin interfaceStockChartModel<StockChartGroup>- Parameters:
periodSelector- period selector- Returns:
- stock chart model
-
getStockEventsSettings
- Specified by:
getStockEventsSettingsin interfaceStockChartModel<StockChartGroup>- Returns:
- stock events settings
-
setStockEventsSettings
Description copied from interface:StockChartModelSets settings for stock events.- Specified by:
setStockEventsSettingsin interfaceStockChartModel<StockChartGroup>- Parameters:
stockEventsSettings- stock events settings- Returns:
- stock chart model
-
getTheme
- Specified by:
getThemein interfaceStockChartModel<StockChartGroup>- Returns:
- theme of a chart
-
setTheme
Description copied from interface:StockChartModelSets theme of a chart.- Specified by:
setThemein interfaceStockChartModel<StockChartGroup>- Parameters:
theme- the theme- Returns:
- stock chart model
-
getValueAxesSettings
- Specified by:
getValueAxesSettingsin interfaceStockChartModel<StockChartGroup>- Returns:
- value axes settings
-
setValueAxesSettings
Description copied from interface:StockChartModelSets settings for value axes.- Specified by:
setValueAxesSettingsin interfaceStockChartModel<StockChartGroup>- Parameters:
valueAxesSettings- value axes settings- Returns:
- stock chart model
-
getZoomOutOnDataSetChange
- Specified by:
getZoomOutOnDataSetChangein interfaceStockChartModel<StockChartGroup>- Returns:
- true if chart zoom-out when main data set is changed
-
setZoomOutOnDataSetChange
Description copied from interface:StockChartModelSpecifies whether the chart should zoom-out when main data set is changed. If not set the default value is false.- Specified by:
setZoomOutOnDataSetChangein interfaceStockChartModel<StockChartGroup>- Parameters:
zoomOutOnDataSetChange- zoom out on data set change option- Returns:
- stock chart model
-
getDataSet
Description copied from interface:StockChartModelGets data set by id.- Specified by:
getDataSetin interfaceStockChartModel<StockChartGroup>- Parameters:
id- id of dataSet- Returns:
- data set
-
getType
-
getAdditionalFields
- Specified by:
getAdditionalFieldsin interfaceStockChartModel<StockChartGroup>- Returns:
- list of additional fields
-
setAdditionalFields
Description copied from interface:StockChartModelSets list of additional fields. Fields from your data provider that should be used directly in the chart configuration.- Specified by:
setAdditionalFieldsin interfaceStockChartModel<StockChartGroup>- Parameters:
additionalFields- list of additional fields- Returns:
- stock chart model
-
getProcessTimeout
- Specified by:
getProcessTimeoutin interfaceStockChartModel<StockChartGroup>- Returns:
- process timeout
-
setProcessTimeout
Description copied from interface:StockChartModelSets the process timeout. If you set it to 1 millisecond or some bigger value, chart will be built in chunks instead of all at once. This is useful if you work with a lot of data and the initial build of the chart takes a lot of time, which freezes the whole web application by not allowing other processes to do their job while the chart is busy. If not set the default value is 0.- Specified by:
setProcessTimeoutin interfaceStockChartModel<StockChartGroup>- Parameters:
processTimeout- process timeout- Returns:
- stock chart model
-
getWiredFields
- Specified by:
getWiredFieldsin classChartModelImpl- Returns:
- fields of the
DataItemthat are bound to the chart
-
onChange
- Specified by:
onChangein interfaceDataSet.DataProviderChangeListener
-
addDataSetDataProviderChangeListener
public void addDataSetDataProviderChangeListener(StockChartGroup.DataSetDataProviderChangeListener listener) -
removeDataSetDataProviderChangeListener
public void removeDataSetDataProviderChangeListener(StockChartGroup.DataSetDataProviderChangeListener listener) -
addDataSetsChangeListener
-
removeDataSetsChangeListener
-