Package io.jmix.charts.model.chart
Interface StockChartModel<T extends StockChartModel>
- All Superinterfaces:
HasColors<T>
- All Known Subinterfaces:
StockChart
- All Known Implementing Classes:
StockChartGroup
,StockChartImpl
-
Method Summary
Modifier and TypeMethodDescriptionaddComparedDataSets
(String... comparedDataSets) Adds compared data sets.addDataSets
(DataSet... dataSets) Adds data sets.addPanels
(StockPanel... panels) Adds stock panels.getDataSet
(String id) Gets data set by id.getPath()
getTheme()
setAddClassNames
(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.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.
-
Method Details
-
getAddClassNames
Boolean getAddClassNames()- Returns:
- true if addClassNames option is enabled
-
setAddClassNames
Set addClassNames to true, if class names should be added to chart elements.- Parameters:
addClassNames
- add class names option- Returns:
- stock chart model
-
getExport
Export getExport()- Returns:
- export menu
-
setExport
Sets the export menu.- Parameters:
export
- export menu- Returns:
- stock chart model
-
getAnimationPlayed
Boolean getAnimationPlayed()- Returns:
- true if animation was already played
-
setAnimationPlayed
Specifies 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.- Parameters:
animationPlayed
- animation played option- Returns:
- stock chart model
-
getAutoResize
Boolean getAutoResize()- Returns:
- true if autoResize is enabled
-
setAutoResize
Set autoResize to true if you want chart to resize itself whenever its parent container size changes. If not set the default value is true.- Parameters:
autoResize
- auto resize option- Returns:
- stock chart model
-
getBalloon
Balloon getBalloon()- Returns:
- balloon
-
setBalloon
Sets the balloon.- Parameters:
balloon
- the balloon- Returns:
- stock chart model
-
getCategoryAxesSettings
CategoryAxesSettings getCategoryAxesSettings()- Returns:
- category axis settings
-
setCategoryAxesSettings
Sets settings for category axes.- Parameters:
categoryAxesSettings
- category axis settings- Returns:
- stock chart model
-
getChartCursorSettings
ChartCursorSettings getChartCursorSettings()- Returns:
- chart cursor settings
-
setChartCursorSettings
Sets chart cursor settings.- Parameters:
chartCursorSettings
- chart cursor settings- Returns:
- stock chart model
-
getChartScrollbarSettings
ChartScrollbarSettings getChartScrollbarSettings() -
setChartScrollbarSettings
Sets chart scrollbar settings.- Parameters:
chartScrollbarSettings
- chart scrollbar settings- Returns:
- stock chart model
-
getClassNamePrefix
String getClassNamePrefix()- Returns:
- class name prefix
-
setClassNamePrefix
Sets 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".- Parameters:
classNamePrefix
- class name prefix string- Returns:
- stock chart model
-
getComparedDataSets
- Returns:
- list of compared data sets
-
setComparedDataSets
Sets the list of of data sets selected for comparing.- Parameters:
comparedDataSets
- compared data sets- Returns:
- stock chart model
-
addComparedDataSets
Adds compared data sets.- Parameters:
comparedDataSets
- compared data sets- Returns:
- stock chart model
-
getDataDateFormat
String getDataDateFormat()- Returns:
- data date format
-
setDataDateFormat
Sets data date format. Please note, that two-digit years "YY" is NOT supported in this setting.- Parameters:
dataDateFormat
- data date format string- Returns:
- stock chart model
-
getDataSet
Gets data set by id.- Parameters:
id
- id of dataSet- Returns:
- data set
-
getDataSets
- Returns:
- list of data sets
-
setDataSets
@StudioElementsGroup(caption="Data Sets", xmlElement="dataSets") T setDataSets(List<DataSet> dataSets) Sets the list of data sets.- Parameters:
dataSets
- list of data sets- Returns:
- stock chart model
-
addDataSets
Adds data sets.- Parameters:
dataSets
- data sets- Returns:
- stock chart model
-
getDataSetSelector
DataSetSelector getDataSetSelector()- Returns:
- data set selector
-
setDataSetSelector
Sets 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.- Parameters:
dataSetSelector
- data set selector- Returns:
- stock chart model
-
getExtendToFullPeriod
Boolean getExtendToFullPeriod()- 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
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. If not set the default value is true.- Parameters:
extendToFullPeriod
- extend to full period option- Returns:
- stock chart model
-
getFirstDayOfWeek
Integer getFirstDayOfWeek()- Returns:
- first day of week
-
setFirstDayOfWeek
Sets day week starts. 0 - Sunday, 1 - Monday etc. If not set the default value is 1.- Parameters:
firstDayOfWeek
- first day of week- Returns:
- stock chart model
-
getGlueToTheEnd
Boolean getGlueToTheEnd()- Returns:
- true if the scope of the data view is set to the end after data update
-
setGlueToTheEnd
Set 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.- Parameters:
glueToTheEnd
- glue to the end option- Returns:
- stock chart model
-
getLanguage
String getLanguage()- Returns:
- language
-
setLanguage
Sets language of default. Note, you should include language js file from amcharts/lang and then use variable name used in this file, likesetLanguage("de")
.- Parameters:
language
- language string- Returns:
- stock chart model
-
getLegendSettings
LegendSettings getLegendSettings()- Returns:
- legend settings
-
setLegendSettings
Sets legend settings.- Parameters:
legendSettings
- legend settings- Returns:
- stock chart model
-
getMainDataSet
String getMainDataSet()- Returns:
- main data set
-
setMainDataSet
Sets data set as main.- Parameters:
mainDataSet
- main data set- Returns:
- stock chart model
-
getMouseWheelScrollEnabled
Boolean getMouseWheelScrollEnabled()- Returns:
- true if scrolling of a chart with mouse wheel is enabled
-
setMouseWheelScrollEnabled
Set mouseWheelScrollEnabled to true you wont to scroll chart with mouse wheel. If not set the default value is false.- Parameters:
mouseWheelScrollEnabled
- mouse wheel scroll option- Returns:
- stock chart model
-
getPanels
List<StockPanel> getPanels()- Returns:
- list of stock panels
-
setPanels
Sets list of stock panels.- Parameters:
panels
- list of stock panels- Returns:
- stock chart model
-
addPanels
Adds stock panels.- Parameters:
panels
- stock panels- Returns:
- stock chart model
-
getPanelsSettings
PanelsSettings getPanelsSettings()- Returns:
- panel settings
-
setPanelsSettings
Sets settings for stock panels.- Parameters:
panelsSettings
- panel settings- Returns:
- stock chart model
-
getPath
String getPath()- Returns:
- path
-
setPath
Specifies absolute or relative path to amCharts files.- Parameters:
path
- the path string- Returns:
- stock chart model
-
getPathToImages
String getPathToImages() -
setPathToImages
Specifies path to the folder where images like resize grips, lens and similar are.- Parameters:
pathToImages
- path to images- Returns:
- stock chart model
-
getPeriodSelector
PeriodSelector getPeriodSelector()- Returns:
- period selector
-
setPeriodSelector
Sets 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.- Parameters:
periodSelector
- period selector- Returns:
- stock chart model
-
getStockEventsSettings
StockEventsSettings getStockEventsSettings()- Returns:
- stock events settings
-
setStockEventsSettings
Sets settings for stock events.- Parameters:
stockEventsSettings
- stock events settings- Returns:
- stock chart model
-
getTheme
ChartTheme getTheme()- Returns:
- theme of a chart
-
setTheme
Sets theme of a chart.- Parameters:
theme
- the theme- Returns:
- stock chart model
-
getValueAxesSettings
ValueAxesSettings getValueAxesSettings()- Returns:
- value axes settings
-
setValueAxesSettings
Sets settings for value axes.- Parameters:
valueAxesSettings
- value axes settings- Returns:
- stock chart model
-
getZoomOutOnDataSetChange
Boolean getZoomOutOnDataSetChange()- Returns:
- true if chart zoom-out when main data set is changed
-
setZoomOutOnDataSetChange
Specifies whether the chart should zoom-out when main data set is changed. If not set the default value is false.- Parameters:
zoomOutOnDataSetChange
- zoom out on data set change option- Returns:
- stock chart model
-
getAdditionalFields
- Returns:
- list of additional fields
-
setAdditionalFields
Sets list of additional fields. Fields from your data provider that should be used directly in the chart configuration.- Parameters:
additionalFields
- list of additional fields- Returns:
- stock chart model
-
getProcessTimeout
Integer getProcessTimeout()- Returns:
- process timeout
-
setProcessTimeout
Sets 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.- Parameters:
processTimeout
- process timeout- Returns:
- stock chart model
-