Package io.jmix.charts.model.chart.impl
Class AbstractSerialChart<T extends AbstractSerialChart>
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<T>
- All Implemented Interfaces:
HasStartEffect<T>,ChartModel<T>,CoordinateChartModel<T>,RectangularChartModel<T>,SeriesBasedChartModel<T>,HasColors<T>,HasMargins<T>,Serializable
- Direct Known Subclasses:
GanttChartModelImpl,SerialChartModelImpl,StockPanel
public abstract class AbstractSerialChart<T extends AbstractSerialChart>
extends RectangularChartModelImpl<T>
implements SeriesBasedChartModel<T>
See documentation for properties of AmSerialChart JS object.
http://docs.amcharts.com/3/javascriptcharts/AmSerialChart
http://docs.amcharts.com/3/javascriptcharts/AmSerialChart
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class io.jmix.charts.model.chart.impl.AbstractChart
AbstractChart.DataProviderChangeListener -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionsetBalloonDateFormat(String balloonDateFormat) Sets date format of the graph balloon (if chart parses dates and you don't useCursor).setCategoryAxis(CategoryAxis categoryAxis) Sets the category axis.setCategoryField(String categoryField) Sets the category field name.setColumnSpacing(Integer columnSpacing) Sets the gap in pixels between two columns of the same category.setColumnSpacing3D(Integer columnSpacing3D) Sets space between 3D stacked columns.setColumnWidth(Double columnWidth) Sets relative width of columns.setDataDateFormat(String dataDateFormat) Sets data date format.setMaxSelectedSeries(Integer maxSelectedSeries) Sets maximum number of series allowed to select.setMaxSelectedTime(Long maxSelectedTime) Sets the longest time span allowed to select in milliseconds for example, 259200000 will limit selection to 3 days.setMinSelectedTime(Long minSelectedTime) Sets the shortest time span allowed to select in milliseconds for example, 1000 will limit selection to 1 second.setMouseWheelScrollEnabled(Boolean mouseWheelScrollEnabled) Set true if you want scroll chart with the mouse wheel.setMouseWheelZoomEnabled(Boolean mouseWheelZoomEnabled) Set mouseWheelZoomEnabled to true if zooming of a chart with mouse wheel should be enabled.Set rotate to true, if the chart should be rotated by 90 degrees (the columns will become bars).setSynchronizeGrid(Boolean synchronizeGrid) Set synchronizeGrid property to true and the chart will adjust minimum and maximum of axes so that the grid would be show at equal intervals.setValueScrollbar(Scrollbar valueScrollbar) Sets value scrollbar, enables scrolling value axes.setZoomOutOnDataUpdate(Boolean zoomOutOnDataUpdate) Set zoomOutOnDataUpdate to true if chart should be zoom-out when data is updated.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, setZoomOutTextMethods 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, setValueAxesMethods 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, setUsePrefixesMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods 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, setUsePrefixesMethods 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, setValueAxesMethods inherited from interface io.jmix.charts.model.HasMargins
getMarginBottom, getMarginLeft, getMarginRight, getMarginTop, setMarginBottom, setMarginLeft, setMarginRight, setMarginTopMethods inherited from interface io.jmix.charts.model.animation.HasStartEffect
getStartDuration, getStartEffect, setStartDuration, setStartEffectMethods 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
-
Constructor Details
-
AbstractSerialChart
-
-
Method Details
-
getCategoryAxis
- Specified by:
getCategoryAxisin interfaceSeriesBasedChartModel<T extends AbstractSerialChart>- Returns:
- category axis
-
setCategoryAxis
Description copied from interface:SeriesBasedChartModelSets the category axis.- Specified by:
setCategoryAxisin interfaceSeriesBasedChartModel<T extends AbstractSerialChart>- Parameters:
categoryAxis- the category axis- Returns:
- chart model
-
getCategoryField
- Specified by:
getCategoryFieldin interfaceSeriesBasedChartModel<T extends AbstractSerialChart>- Returns:
- category field name
-
setCategoryField
Description copied from interface:SeriesBasedChartModelSets the category field name. It tells the chart the name of the field from your data provider object which will be used for category axis values.- Specified by:
setCategoryFieldin interfaceSeriesBasedChartModel<T extends AbstractSerialChart>- Parameters:
categoryField- category field name string- Returns:
- chart model
-
getBalloonDateFormat
- Specified by:
getBalloonDateFormatin interfaceSeriesBasedChartModel<T extends AbstractSerialChart>- Returns:
- balloon date format
-
setBalloonDateFormat
Description copied from interface:SeriesBasedChartModelSets date format of the graph balloon (if chart parses dates and you don't useCursor). If not set the default value is "MMM DD, YYYY".- Specified by:
setBalloonDateFormatin interfaceSeriesBasedChartModel<T extends AbstractSerialChart>- Parameters:
balloonDateFormat- the balloon date format- Returns:
- chart model
-
getColumnSpacing3D
- Specified by:
getColumnSpacing3Din interfaceSeriesBasedChartModel<T extends AbstractSerialChart>- Returns:
- space between 3D stacked columns
-
setColumnSpacing3D
Description copied from interface:SeriesBasedChartModelSets space between 3D stacked columns. If not set the default value is 0.- Specified by:
setColumnSpacing3Din interfaceSeriesBasedChartModel<T extends AbstractSerialChart>- Parameters:
columnSpacing3D- space between 3D stacked columns- Returns:
- chart model
-
getColumnSpacing
- Specified by:
getColumnSpacingin interfaceSeriesBasedChartModel<T extends AbstractSerialChart>- Returns:
- column spacing in pixels
-
setColumnSpacing
Description copied from interface:SeriesBasedChartModelSets the gap in pixels between two columns of the same category. If not set the default value is 5.- Specified by:
setColumnSpacingin interfaceSeriesBasedChartModel<T extends AbstractSerialChart>- Parameters:
columnSpacing- column spacing in pixels- Returns:
- chart model
-
getColumnWidth
- Specified by:
getColumnWidthin interfaceSeriesBasedChartModel<T extends AbstractSerialChart>- Returns:
- relative width of columns
-
setColumnWidth
Description copied from interface:SeriesBasedChartModelSets relative width of columns. Value range is 0 - 1. If not set the default value is 0.8.- Specified by:
setColumnWidthin interfaceSeriesBasedChartModel<T extends AbstractSerialChart>- Parameters:
columnWidth- relative width of columns- Returns:
- chart model
-
getDataDateFormat
- Specified by:
getDataDateFormatin interfaceSeriesBasedChartModel<T extends AbstractSerialChart>- Returns:
- data date format
-
setDataDateFormat
Description copied from interface:SeriesBasedChartModelSets data date format. Even if your chart parses dates, you can pass them as strings in your data – all you need to do is to set data date format and the chart will parse dates to date objects. Please note that two-digit years "YY" as well as literal month names "MMM" are NOT supported in this setting.- Specified by:
setDataDateFormatin interfaceSeriesBasedChartModel<T extends AbstractSerialChart>- Parameters:
dataDateFormat- data date format string- Returns:
- chart model
-
getMaxSelectedSeries
- Specified by:
getMaxSelectedSeriesin interfaceSeriesBasedChartModel<T extends AbstractSerialChart>- Returns:
- maximum number of selected series
-
setMaxSelectedSeries
Description copied from interface:SeriesBasedChartModelSets maximum number of series allowed to select.- Specified by:
setMaxSelectedSeriesin interfaceSeriesBasedChartModel<T extends AbstractSerialChart>- Parameters:
maxSelectedSeries- the maximum number of selected series- Returns:
- chart model
-
getMaxSelectedTime
- Specified by:
getMaxSelectedTimein interfaceSeriesBasedChartModel<T extends AbstractSerialChart>- Returns:
- maximum selected time in milliseconds
-
setMaxSelectedTime
Description copied from interface:SeriesBasedChartModelSets the longest time span allowed to select in milliseconds for example, 259200000 will limit selection to 3 days. Works ifCategoryAxis.equalSpacingis set to false.- Specified by:
setMaxSelectedTimein interfaceSeriesBasedChartModel<T extends AbstractSerialChart>- Parameters:
maxSelectedTime- the maximum selected time in milliseconds- Returns:
- chart model
-
getMinSelectedTime
- Specified by:
getMinSelectedTimein interfaceSeriesBasedChartModel<T extends AbstractSerialChart>- Returns:
- minimum selected time in milliseconds
-
setMinSelectedTime
Description copied from interface:SeriesBasedChartModelSets the shortest time span allowed to select in milliseconds for example, 1000 will limit selection to 1 second. Works ifCategoryAxis.equalSpacingis set to false. If not set the default value is 0.- Specified by:
setMinSelectedTimein interfaceSeriesBasedChartModel<T extends AbstractSerialChart>- Parameters:
minSelectedTime- the minimum selected time in milliseconds- Returns:
- chart model
-
getMouseWheelScrollEnabled
- Specified by:
getMouseWheelScrollEnabledin interfaceSeriesBasedChartModel<T extends AbstractSerialChart>- Returns:
- true if scroll chart with the mouse wheel is enabled
-
setMouseWheelScrollEnabled
Description copied from interface:SeriesBasedChartModelSet true if you want scroll chart with the mouse wheel. If you press shift while rotating mouse wheel, the chart will zoom-in/out. If not set the default value is false.- Specified by:
setMouseWheelScrollEnabledin interfaceSeriesBasedChartModel<T extends AbstractSerialChart>- Parameters:
mouseWheelScrollEnabled- mouse wheel scroll option- Returns:
- chart model
-
getRotate
- Specified by:
getRotatein interfaceSeriesBasedChartModel<T extends AbstractSerialChart>- Returns:
- true if rotate is enabled
-
setRotate
Description copied from interface:SeriesBasedChartModelSet rotate to true, if the chart should be rotated by 90 degrees (the columns will become bars). If not set the default value is false.- Specified by:
setRotatein interfaceSeriesBasedChartModel<T extends AbstractSerialChart>- Parameters:
rotate- rotate option- Returns:
- chart model
-
getZoomOutOnDataUpdate
- Specified by:
getZoomOutOnDataUpdatein interfaceSeriesBasedChartModel<T extends AbstractSerialChart>- Returns:
- true if chart should be zoom-out when data is updated
-
setZoomOutOnDataUpdate
Description copied from interface:SeriesBasedChartModelSet zoomOutOnDataUpdate to true if chart should be zoom-out when data is updated. If not set the default value is true.- Specified by:
setZoomOutOnDataUpdatein interfaceSeriesBasedChartModel<T extends AbstractSerialChart>- Parameters:
zoomOutOnDataUpdate- zoomOutOnDataUpdate option- Returns:
- chart model
-
getMouseWheelZoomEnabled
- Specified by:
getMouseWheelZoomEnabledin interfaceSeriesBasedChartModel<T extends AbstractSerialChart>- Returns:
- true if zooming of a chart with mouse wheel is enabled
-
setMouseWheelZoomEnabled
Description copied from interface:SeriesBasedChartModelSet mouseWheelZoomEnabled to true if zooming of a chart with mouse wheel should be enabled. If you press shift while rotating mouse wheel, the chart will scroll. If not set the default value is false.- Specified by:
setMouseWheelZoomEnabledin interfaceSeriesBasedChartModel<T extends AbstractSerialChart>- Parameters:
mouseWheelZoomEnabled- mouseWheelZoomEnabled option- Returns:
- chart model
-
getValueScrollbar
- Specified by:
getValueScrollbarin interfaceSeriesBasedChartModel<T extends AbstractSerialChart>- Returns:
- value scrollbar
-
setValueScrollbar
Description copied from interface:SeriesBasedChartModelSets value scrollbar, enables scrolling value axes.- Specified by:
setValueScrollbarin interfaceSeriesBasedChartModel<T extends AbstractSerialChart>- Parameters:
valueScrollbar- the value scrollbar- Returns:
- chart model
-
getSynchronizeGrid
- Specified by:
getSynchronizeGridin interfaceSeriesBasedChartModel<T extends AbstractSerialChart>- Returns:
- true if synchronized grid is enabled
-
setSynchronizeGrid
Description copied from interface:SeriesBasedChartModelSet synchronizeGrid property to true and the chart will adjust minimum and maximum of axes so that the grid would be show at equal intervals. This helps users to compare values more easily.- Specified by:
setSynchronizeGridin interfaceSeriesBasedChartModel<T extends AbstractSerialChart>- Parameters:
synchronizeGrid- synchronized grid option- Returns:
- chart model
-
getWiredFields
- Overrides:
getWiredFieldsin classCoordinateChartModelImpl<T extends AbstractSerialChart>- Returns:
- fields of the
DataItemthat are bound to the chart
-