Package io.jmix.charts.model.chart.impl
Class StockPanel
java.lang.Object
io.jmix.charts.model.AbstractChartObject
io.jmix.charts.model.chart.impl.ChartModelImpl
io.jmix.charts.model.chart.impl.AbstractChart<T>
io.jmix.charts.model.chart.impl.CoordinateChartModelImpl<T>
io.jmix.charts.model.chart.impl.RectangularChartModelImpl<T>
io.jmix.charts.model.chart.impl.AbstractSerialChart<StockPanel>
io.jmix.charts.model.chart.impl.StockPanel
- All Implemented Interfaces:
HasStartEffect<StockPanel>
,ChartModel<StockPanel>
,CoordinateChartModel<StockPanel>
,RectangularChartModel<StockPanel>
,SeriesBasedChartModel<StockPanel>
,HasColors<StockPanel>
,HasMargins<StockPanel>
,Serializable
public class StockPanel
extends AbstractSerialChart<StockPanel>
implements SeriesBasedChartModel<StockPanel>
Creates stock panels (charts).
See documentation for properties of StockPanel JS object.
http://docs.amcharts.com/3/javascriptstockchart/StockPanel
StockChartModel
can have multiple Stock panels.
See documentation for properties of StockPanel JS object.
http://docs.amcharts.com/3/javascriptstockchart/StockPanel
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class io.jmix.charts.model.chart.impl.AbstractChart
AbstractChart.DataProviderChangeListener
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionaddStockGraphs
(StockGraph... stockGraphs) Adds stock graphsgetId()
getTitle()
setAllowTurningOff
(Boolean allowTurningOff) Set allowTurningOff to true if x button should be displayed near the panel.setDrawingIconsEnabled
(Boolean drawingIconsEnabled) Set drawingIconsEnabled to true if drawing icons should be displayed in top-right corner.setDrawOnAxis
(ValueAxis drawOnAxis) Sets value axis.setEraseAll
(Boolean eraseAll) Set eraseAll to true if all trend lines should be erased when erase button is clicked.setIconSize
(Integer iconSize) Sets size of trend line drawing icons.@Max(100L) @Min(0L) StockPanel
setPercentHeight
(Integer percentHeight) Sets relative height of panel.setRecalculateFromDate
(Date recalculateFromDate) Sets from which date's value should be used as a base when recalculating values to percent.setRecalculateToPercents
(String recalculateToPercents) Specifies when values should be recalculated to percents.setShowCategoryAxis
(Boolean showCategoryAxis) Set showCategoryAxis to false if this panel should't show category axis.setShowComparedOnTop
(Boolean showComparedOnTop) Set showComparedOnTop to false if compared graphs shouldn't be shown above or behind the main graph.setStockGraphs
(List<StockGraph> stockGraphs) Sets list of stock graphs.setStockLegend
(StockLegend stockLegend) Sets stock chart legend.Sets a title of a panel.@Max(1L) @Min(0L) StockPanel
setTrendLineAlpha
(Double trendLineAlpha) Sets trend line opacity.setTrendLineColor
(Color trendLineColor) Sets trend line color.setTrendLineDashLength
(Integer trendLineDashLength) Sets trend line dash length.setTrendLineThickness
(Integer trendLineThickness) Sets trend line thickness.Methods inherited from class io.jmix.charts.model.chart.impl.AbstractSerialChart
getBalloonDateFormat, getCategoryAxis, getCategoryField, getColumnSpacing, getColumnSpacing3D, getColumnWidth, getDataDateFormat, getMaxSelectedSeries, getMaxSelectedTime, getMinSelectedTime, getMouseWheelScrollEnabled, getMouseWheelZoomEnabled, getRotate, getSynchronizeGrid, getValueScrollbar, getZoomOutOnDataUpdate, setBalloonDateFormat, setCategoryAxis, setCategoryField, setColumnSpacing, setColumnSpacing3D, setColumnWidth, setDataDateFormat, setMaxSelectedSeries, setMaxSelectedTime, setMinSelectedTime, setMouseWheelScrollEnabled, setMouseWheelZoomEnabled, setRotate, setSynchronizeGrid, setValueScrollbar, setZoomOutOnDataUpdate
Methods inherited from class io.jmix.charts.model.chart.impl.RectangularChartModelImpl
addTrendLines, getAngle, getAutoMarginOffset, getAutoMargins, getChartCursor, getChartScrollbar, getDepth3D, getMarginBottom, getMarginLeft, getMarginRight, getMarginsUpdated, getMarginTop, getMaxZoomFactor, getMinMarginBottom, getMinMarginLeft, getMinMarginRight, getMinMarginTop, getPlotAreaBorderAlpha, getPlotAreaBorderColor, getPlotAreaFillAlphas, getPlotAreaFillColors, getPlotAreaGradientAngle, getTrendLines, getZoomOutButtonAlpha, getZoomOutButtonColor, getZoomOutButtonImage, getZoomOutButtonImageSize, getZoomOutButtonPadding, getZoomOutButtonRollOverAlpha, getZoomOutButtonTabIndex, getZoomOutText, setAngle, setAutoMarginOffset, setAutoMargins, setChartCursor, setChartScrollbar, setDepth3D, setMarginBottom, setMarginLeft, setMarginRight, setMarginsUpdated, setMarginTop, setMaxZoomFactor, setMinMarginBottom, setMinMarginLeft, setMinMarginRight, setMinMarginTop, setPlotAreaBorderAlpha, setPlotAreaBorderColor, setPlotAreaFillAlphas, setPlotAreaFillColors, setPlotAreaGradientAngle, setTrendLines, setZoomOutButtonAlpha, setZoomOutButtonColor, setZoomOutButtonImage, setZoomOutButtonImageSize, setZoomOutButtonPadding, setZoomOutButtonRollOverAlpha, setZoomOutButtonTabIndex, setZoomOutText
Methods inherited from class io.jmix.charts.model.chart.impl.CoordinateChartModelImpl
addColors, addGraphs, addGuides, addValueAxes, getColors, getGraphs, getGridAboveGraphs, getGuides, getSequencedAnimation, getStartAlpha, getStartDuration, getStartEffect, getUrlTarget, getValueAxes, setColors, setGraphs, setGridAboveGraphs, setGuides, setSequencedAnimation, setStartAlpha, setStartDuration, setStartEffect, setUrlTarget, setValueAxes
Methods inherited from class io.jmix.charts.model.chart.impl.AbstractChart
addAdditionalFields, addData, addDataProviderChangeListener, addLabels, addPrefixesOfBigNumbers, addPrefixesOfSmallNumbers, addTitles, fireDataProviderChanged, getAccessible, getAccessibleDescription, getAccessibleTitle, getAddClassNames, getAdditionalFields, getAllLabels, getAutoDisplay, getAutoResize, getAutoTransform, getBackgroundAlpha, getBackgroundColor, getBalloon, getBorderAlpha, getBorderColor, getClassNamePrefix, getColor, getCreditsPosition, getDataProvider, getDecimalSeparator, getDefs, getExport, getFontFamily, getFontSize, getHandDrawn, getHandDrawScatter, getHandDrawThickness, getHideBalloonTime, getLanguage, getLegend, getPanEventsEnabled, getPath, getPathToImages, getPercentPrecision, getPrecision, getPrefixesOfBigNumbers, getPrefixesOfSmallNumbers, getProcessCount, getProcessTimeout, getResponsive, getSvgIcons, getTapToActivate, getTheme, getThousandsSeparator, getTitles, getTouchClickDuration, getType, getUsePrefixes, removeDataProviderSetListener, setAccessible, setAccessibleDescription, setAccessibleTitle, setAddClassNames, setAdditionalFields, setAllLabels, setAutoDisplay, setAutoResize, setAutoTransform, setBackgroundAlpha, setBackgroundColor, setBalloon, setBorderAlpha, setBorderColor, setClassNamePrefix, setColor, setCreditsPosition, setDataProvider, setDecimalSeparator, setDefs, setExport, setFontFamily, setFontSize, setHandDrawn, setHandDrawScatter, setHandDrawThickness, setHideBalloonTime, setLanguage, setLegend, setPanEventsEnabled, setPath, setPathToImages, setPercentPrecision, setPrecision, setPrefixesOfBigNumbers, setPrefixesOfSmallNumbers, setProcessCount, setProcessTimeout, setResponsive, setSvgIcons, setTapToActivate, setTheme, setThousandsSeparator, setTitles, setTouchClickDuration, setUsePrefixes
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface io.jmix.charts.model.chart.ChartModel
addAdditionalFields, addData, addLabels, addPrefixesOfBigNumbers, addPrefixesOfSmallNumbers, addTitles, getAccessible, getAccessibleDescription, getAccessibleTitle, getAddClassNames, getAdditionalFields, getAllLabels, getAutoDisplay, getAutoResize, getAutoTransform, getBackgroundAlpha, getBackgroundColor, getBalloon, getBorderAlpha, getBorderColor, getClassNamePrefix, getColor, getCreditsPosition, getDataProvider, getDecimalSeparator, getDefs, getExport, getFontFamily, getFontSize, getHandDrawn, getHandDrawScatter, getHandDrawThickness, getHideBalloonTime, getLanguage, getLegend, getPanEventsEnabled, getPath, getPathToImages, getPercentPrecision, getPrecision, getPrefixesOfBigNumbers, getPrefixesOfSmallNumbers, getProcessCount, getProcessTimeout, getResponsive, getSvgIcons, getTapToActivate, getTheme, getThousandsSeparator, getTitles, getTouchClickDuration, getUsePrefixes, setAccessible, setAccessibleDescription, setAccessibleTitle, setAddClassNames, setAdditionalFields, setAllLabels, setAutoDisplay, setAutoResize, setAutoTransform, setBackgroundAlpha, setBackgroundColor, setBalloon, setBorderAlpha, setBorderColor, setClassNamePrefix, setColor, setCreditsPosition, setDataProvider, setDecimalSeparator, setDefs, setExport, setFontFamily, setFontSize, setHandDrawn, setHandDrawScatter, setHandDrawThickness, setHideBalloonTime, setLanguage, setLegend, setPanEventsEnabled, setPath, setPathToImages, setPercentPrecision, setPrecision, setPrefixesOfBigNumbers, setPrefixesOfSmallNumbers, setProcessCount, setProcessTimeout, setResponsive, setSvgIcons, setTapToActivate, setTheme, setThousandsSeparator, setTitles, setTouchClickDuration, setUsePrefixes
Methods inherited from interface io.jmix.charts.model.chart.CoordinateChartModel
addGraphs, addGuides, addValueAxes, getGraphs, getGridAboveGraphs, getGuides, getSequencedAnimation, getStartAlpha, getUrlTarget, getValueAxes, setGraphs, setGridAboveGraphs, setGuides, setSequencedAnimation, setStartAlpha, setUrlTarget, setValueAxes
Methods inherited from interface io.jmix.charts.model.HasMargins
getMarginBottom, getMarginLeft, getMarginRight, getMarginTop, setMarginBottom, setMarginLeft, setMarginRight, setMarginTop
Methods inherited from interface io.jmix.charts.model.animation.HasStartEffect
getStartDuration, getStartEffect, setStartDuration, setStartEffect
Methods inherited from interface io.jmix.charts.model.chart.RectangularChartModel
addTrendLines, getAngle, getAutoMarginOffset, getAutoMargins, getChartCursor, getChartScrollbar, getDepth3D, getMarginsUpdated, getMaxZoomFactor, getMinMarginBottom, getMinMarginLeft, getMinMarginRight, getMinMarginTop, getPlotAreaBorderAlpha, getPlotAreaBorderColor, getPlotAreaFillAlphas, getPlotAreaFillColors, getPlotAreaGradientAngle, getTrendLines, getZoomOutButtonAlpha, getZoomOutButtonColor, getZoomOutButtonImage, getZoomOutButtonImageSize, getZoomOutButtonPadding, getZoomOutButtonRollOverAlpha, getZoomOutButtonTabIndex, getZoomOutText, setAngle, setAutoMarginOffset, setAutoMargins, setChartCursor, setChartScrollbar, setDepth3D, setMarginsUpdated, setMaxZoomFactor, setMinMarginBottom, setMinMarginLeft, setMinMarginRight, setMinMarginTop, setPlotAreaBorderAlpha, setPlotAreaBorderColor, setPlotAreaFillAlphas, setPlotAreaFillColors, setPlotAreaGradientAngle, setTrendLines, setZoomOutButtonAlpha, setZoomOutButtonColor, setZoomOutButtonImage, setZoomOutButtonImageSize, setZoomOutButtonPadding, setZoomOutButtonRollOverAlpha, setZoomOutButtonTabIndex, setZoomOutText
Methods inherited from interface io.jmix.charts.model.chart.SeriesBasedChartModel
getBalloonDateFormat, getCategoryAxis, getCategoryField, getColumnSpacing, getColumnSpacing3D, getColumnWidth, getDataDateFormat, getMaxSelectedSeries, getMaxSelectedTime, getMinSelectedTime, getMouseWheelScrollEnabled, getMouseWheelZoomEnabled, getRotate, getSynchronizeGrid, getValueScrollbar, getZoomOutOnDataUpdate, setBalloonDateFormat, setCategoryAxis, setCategoryField, setColumnSpacing, setColumnSpacing3D, setColumnWidth, setDataDateFormat, setMaxSelectedSeries, setMaxSelectedTime, setMinSelectedTime, setMouseWheelScrollEnabled, setMouseWheelZoomEnabled, setRotate, setSynchronizeGrid, setValueScrollbar, setZoomOutOnDataUpdate
-
Constructor Details
-
StockPanel
public StockPanel()
-
-
Method Details
-
getId
-
setId
-
getAllowTurningOff
- Returns:
- true if x button is displayed near the panel
-
setAllowTurningOff
Set allowTurningOff to true if x button should be displayed near the panel. This button allows turning panel off. If not set the default value is false.- Parameters:
allowTurningOff
- allowTurningOff option- Returns:
- stock panel
-
getDrawingIconsEnabled
- Returns:
- true if drawing icons is displayed in top-right corner
-
setDrawingIconsEnabled
@StudioProperty(defaultValue="false") public StockPanel setDrawingIconsEnabled(Boolean drawingIconsEnabled) Set drawingIconsEnabled to true if drawing icons should be displayed in top-right corner. If not set the default value is false.- Parameters:
drawingIconsEnabled
- drawingIconsEnabled option- Returns:
- stock panel
-
getDrawOnAxis
- Returns:
- value axis
-
setDrawOnAxis
Sets value axis. Specifies on which value axis user can draw trend lines. Set drawingIconsEnabled to true if you want drawing icons to be visible. First value axis will be used if not set here. You can use a reference to the value axis object or id of value axis.- Parameters:
drawOnAxis
- value axis- Returns:
- stock panel
-
getEraseAll
- Returns:
- true if all trend lines are erased
-
setEraseAll
Set eraseAll to true if all trend lines should be erased when erase button is clicked. If eraseAll is set to false trend lines will be erased one by one. If not set the default value is false.- Parameters:
eraseAll
- eraseAll option- Returns:
- stock panel
-
getIconSize
- Returns:
- size of trend line drawing icons
-
setIconSize
Sets size of trend line drawing icons. If you change this size, you should update icon images if you want them to look properly. If not set the default value is 18.- Parameters:
iconSize
- icon size- Returns:
- stock panel
-
getPercentHeight
- Returns:
- relative height of panel
-
setPercentHeight
@StudioProperty @Max(100L) @Min(0L) public @Max(100L) @Min(0L) StockPanel setPercentHeight(Integer percentHeight) Sets relative height of panel. Possible values 0 - 100.- Parameters:
percentHeight
- percent height- Returns:
- stock panel
-
getRecalculateFromDate
- Returns:
- from which date's value is used as a base when recalculating values to percent
-
setRecalculateFromDate
Sets from which date's value should be used as a base when recalculating values to percent.- Parameters:
recalculateFromDate
- date- Returns:
- stock panel
-
getRecalculateToPercents
- Returns:
- recalculate to percents value
-
setRecalculateToPercents
@StudioProperty(type=OPTIONS, options={"never","always","whenComparing"}, defaultValue="whenComparing") public StockPanel setRecalculateToPercents(String recalculateToPercents) Specifies when values should be recalculated to percents. Possible values are: "never", "always", "whenComparing". If not set the default value is "whenComparing".- Parameters:
recalculateToPercents
- recalculate to percents value- Returns:
- stock panel
-
getShowCategoryAxis
- Returns:
- true of this panel shows category axis
-
setShowCategoryAxis
@StudioProperty(defaultValue="true") public StockPanel setShowCategoryAxis(Boolean showCategoryAxis) Set showCategoryAxis to false if this panel should't show category axis. If not set the default value is true.- Parameters:
showCategoryAxis
- showCategoryAxis option- Returns:
- stock panel
-
getShowComparedOnTop
- Returns:
- true if compared graphs are shown above or behind the main graph
-
setShowComparedOnTop
@StudioProperty(defaultValue="true") public StockPanel setShowComparedOnTop(Boolean showComparedOnTop) Set showComparedOnTop to false if compared graphs shouldn't be shown above or behind the main graph. If not set the default value is true.- Parameters:
showComparedOnTop
- showComparedOnTop option- Returns:
- stock panel
-
getStockGraphs
- Returns:
- list of stock graphs
-
setStockGraphs
@StudioElementsGroup(caption="Stock Graphs", xmlElement="stockGraphs") public StockPanel setStockGraphs(List<StockGraph> stockGraphs) Sets list of stock graphs.- Parameters:
stockGraphs
- list of stock graphs- Returns:
- stock panel
-
addStockGraphs
Adds stock graphs- Parameters:
stockGraphs
- stock graphs- Returns:
- stock panel
-
getStockLegend
- Returns:
- stock chart legend.
-
setStockLegend
Sets stock chart legend.- Parameters:
stockLegend
- stock legend- Returns:
- stock panel
-
getTitle
- Returns:
- title of a panel
-
setTitle
Sets a title of a panel. Note,StockLegend
should be added in order title to be displayed.- Parameters:
title
- title- Returns:
- stock panel
-
getTrendLineAlpha
- Returns:
- trend line opacity
-
setTrendLineAlpha
@StudioProperty(defaultValue="1") @Max(1L) @Min(0L) public @Max(1L) @Min(0L) StockPanel setTrendLineAlpha(Double trendLineAlpha) Sets trend line opacity. If not set the default value is 1.- Parameters:
trendLineAlpha
- opacity- Returns:
- stock panel
-
getTrendLineColor
- Returns:
- trend line color
-
setTrendLineColor
@StudioProperty(type=OPTIONS, defaultValue="#00CC00") public StockPanel setTrendLineColor(Color trendLineColor) Sets trend line color. If not set the default value is #00CC00.- Parameters:
trendLineColor
- color- Returns:
- stock panel
-
getTrendLineDashLength
- Returns:
- trend line dash length
-
setTrendLineDashLength
@StudioProperty(defaultValue="0") public StockPanel setTrendLineDashLength(Integer trendLineDashLength) Sets trend line dash length. If not set the default value is 0.- Parameters:
trendLineDashLength
- dash length- Returns:
- stock panel
-
getTrendLineThickness
- Returns:
- trend line thickness
-
setTrendLineThickness
@StudioProperty(defaultValue="2") public StockPanel setTrendLineThickness(Integer trendLineThickness) Sets trend line thickness. If not set the default value is 2.- Parameters:
trendLineThickness
- thickness- Returns:
- stock panel
-
getWiredFields
- Overrides:
getWiredFields
in classAbstractSerialChart<StockPanel>
- Returns:
- fields of the
DataItem
that are bound to the chart
-