Package io.jmix.charts.model.stock
Class StockGraph
- All Implemented Interfaces:
Serializable
StockGraph displays graphs on
See documentation for properties of StockGraph JS object.
http://docs.amcharts.com/3/javascriptstockchart/StockGraph
StockPanel
.
See documentation for properties of StockGraph JS object.
http://docs.amcharts.com/3/javascriptstockchart/StockGraph
- See Also:
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionsetComparable
(Boolean comparable) Sets comparable to true if this graph should be compared if some data set is selected for comparing.setCompareField
(String compareField) Sets the field to be used to generate comparing the graph.setCompareFromStart
(Boolean compareFromStart) Set compareFromStart to true if the graphs should use first value as a base value instead of using the first value of selected period when data sets are compared.setCompareGraph
(Graph compareGraph) Sets config of compared graphs.setCompareGraphBalloonColor
(Color compareGraphBalloonColor) Sets balloon color of comparing graph.setCompareGraphBalloonFunction
(JsFunction compareGraphBalloonFunction) Sets JS function.setCompareGraphBalloonText
(String compareGraphBalloonText) Sets balloon text of comparing graph.setCompareGraphBullet
(String compareGraphBullet) Sets bullet of comparing graph.@Max(1L) @Min(0L) StockGraph
setCompareGraphBulletBorderAlpha
(Double compareGraphBulletBorderAlpha) Sets opacity of bullet border of comparing graph.setCompareGraphBulletBorderColor
(Color compareGraphBulletBorderColor) Sets color of bullet border of comparing graph.setCompareGraphBulletBorderThickness
(Integer compareGraphBulletBorderThickness) Sets thickness of bullet border of comparing graph.setCompareGraphBulletColor
(Color compareGraphBulletColor) Sets color of compared graphs bullets.setCompareGraphBulletSize
(Integer compareGraphBulletSize) Sets bullet size of comparing graph.setCompareGraphCornerRadiusTop
(Integer compareGraphCornerRadiusTop) Sets corner radius of comparing graph (if type is "column").setCompareGraphDashLength
(Integer compareGraphDashLength) Sets dash length of compare graph.@Max(1L) @Min(0L) StockGraph
setCompareGraphFillAlphas
(Double compareGraphFillAlphas) Sets fill alpha of comparing graph.setCompareGraphFillColors
(List<Color> compareGraphFillColors) Sets list of fill colors of comparing graph.@Max(1L) @Min(0L) StockGraph
setCompareGraphLineAlpha
(Double compareGraphLineAlpha) Sets opacity of comparing graph line.setCompareGraphLineColor
(Color compareGraphLineColor) Sets color of compare graph (by default data set color is used).setCompareGraphLineThickness
(Integer compareGraphLineThickness) Sets thickness of compare graph.setCompareGraphType
(GraphType compareGraphType) Sets type of comparing graph.setCompareGraphVisibleInLegend
(Boolean compareGraphVisibleInLegend) Set compareGraphVisibleInLegend to false if compare graph shouldn't be visible in legend.setPeriodValue
(StockGraphValue periodValue) Sets period value.setRecalculateValue
(StockGraphValue recalculateValue) Sets recalculate value.setShowEventsOnComparedGraphs
(Boolean showEventsOnComparedGraphs) Set showEventsOnComparedGraphs to true if events of compared graphs should be shown.setUseDataSetColors
(Boolean useDataSetColors) Specifies whether data set color should be used as this graph's lineColor.Methods inherited from class io.jmix.charts.model.graph.AbstractGraph
getAccessibleLabel, getAlphaField, getAnimationPlayed, getBalloon, getBalloonColor, getBalloonFunction, getBalloonText, getBehindColumns, getBullet, getBulletAlpha, getBulletAxis, getBulletBorderAlpha, getBulletBorderColor, getBulletBorderThickness, getBulletColor, getBulletField, getBulletHitAreaSize, getBulletOffset, getBulletSize, getBulletSizeField, getClassNameField, getCloseField, getClustered, getColor, getColorField, getColumnIndexField, getColumnWidth, getConnect, getCornerRadiusTop, getCursorBulletAlpha, getCustomBullet, getCustomBulletField, getCustomMarker, getDashLength, getDashLengthField, getDateFormat, getDescriptionField, getErrorField, getFillAlphas, getFillColors, getFillColorsField, getFillToAxis, getFillToGraph, getFixedColumnWidth, getFontSize, getForceGap, getGapField, getGapPeriod, getGradientOrientation, getHidden, getHideBulletsCount, getHighField, getId, getIncludeInMinMax, getLabelAnchor, getLabelColorField, getLabelFunction, getLabelOffset, getLabelPosition, getLabelRotation, getLabelText, getLegendAlpha, getLegendColor, getLegendColorFunction, getLegendPeriodValueText, getLegendValueText, getLineAlpha, getLineColor, getLineColorField, getLineThickness, getLowField, getMarkerType, getMaxBulletSize, getMinBulletSize, getMinDistance, getNegativeBase, getNegativeFillAlphas, getNegativeFillColors, getNegativeLineAlpha, getNegativeLineColor, getNewStack, getNoStepRisers, getOpenField, getPattern, getPatternField, getPeriodSpan, getPointPosition, getPrecision, getProCandlesticks, getShowAllValueLabels, getShowBalloon, getShowBalloonAt, getShowBulletsAt, getShowHandOnHover, getShowOnAxis, getStackable, getStepDirection, getSwitchable, getTabIndex, getTitle, getTopRadius, getType, getUrlField, getUrlTarget, getUseLineColorForBulletBorder, getUseNegativeColorIfDown, getValueAxis, getValueField, getVisibleInLegend, getXAxis, getXField, getYAxis, getYField, setAccessibleLabel, setAlphaField, setAnimationPlayed, setBalloon, setBalloonColor, setBalloonFunction, setBalloonText, setBehindColumns, setBullet, setBulletAlpha, setBulletAxis, setBulletBorderAlpha, setBulletBorderColor, setBulletBorderThickness, setBulletColor, setBulletField, setBulletHitAreaSize, setBulletOffset, setBulletSize, setBulletSizeField, setClassNameField, setCloseField, setClustered, setColor, setColorField, setColumnIndexField, setColumnWidth, setConnect, setCornerRadiusTop, setCursorBulletAlpha, setCustomBullet, setCustomBulletField, setCustomMarker, setDashLength, setDashLengthField, setDateFormat, setDescriptionField, setErrorField, setFillAlphas, setFillColors, setFillColorsField, setFillToAxis, setFillToGraph, setFixedColumnWidth, setFontSize, setForceGap, setGapField, setGapPeriod, setGradientOrientation, setHidden, setHideBulletsCount, setHighField, setId, setIncludeInMinMax, setLabelAnchor, setLabelColorField, setLabelFunction, setLabelOffset, setLabelPosition, setLabelRotation, setLabelText, setLegendAlpha, setLegendColor, setLegendColorFunction, setLegendPeriodValueText, setLegendValueText, setLineAlpha, setLineColor, setLineColorField, setLineThickness, setLowField, setMarkerType, setMaxBulletSize, setMinBulletSize, setMinDistance, setNegativeBase, setNegativeFillAlphas, setNegativeFillColors, setNegativeLineAlpha, setNegativeLineColor, setNewStack, setNoStepRisers, setOpenField, setPattern, setPatternField, setPeriodSpan, setPointPosition, setPrecision, setProCandlesticks, setShowAllValueLabels, setShowBalloon, setShowBalloonAt, setShowBulletsAt, setShowHandOnHover, setShowOnAxis, setStackable, setStepDirection, setSwitchable, setTabIndex, setTitle, setTopRadius, setType, setUrlField, setUrlTarget, setUseLineColorForBulletBorder, setUseNegativeColorIfDown, setValueAxis, setValueField, setVisibleInLegend, setXAxis, setXField, setYAxis, setYField
-
Constructor Details
-
StockGraph
public StockGraph()
-
-
Method Details
-
getComparable
- Returns:
- true if this graph is compared
-
setComparable
Sets comparable to true if this graph should be compared if some data set is selected for comparing. If not set the default value is false.- Parameters:
comparable
- comparable option- Returns:
- stock graph
-
getCompareField
- Returns:
- field that is used to generate comparing the graph
-
setCompareField
Sets the field to be used to generate comparing the graph. Note, this field is not the one used in your data provider, but toField from FieldMapping object.- Parameters:
compareField
- compare field- Returns:
- stock graph
-
getCompareFromStart
- Returns:
- true if compareFromStart is enabled
-
setCompareFromStart
@StudioProperty(defaultValue="false") public StockGraph setCompareFromStart(Boolean compareFromStart) Set compareFromStart to true if the graphs should use first value as a base value instead of using the first value of selected period when data sets are compared. If not set the default value is false.- Parameters:
compareFromStart
- compareFromStart option- Returns:
- stock graph
-
getCompareGraph
- Returns:
- config of compared graphs
-
setCompareGraph
Sets config of compared graphs. This allows you to set any ofGraph
properties on compared graphs instead of using old-style properties like compareGraphBulletBorderThickness.- Parameters:
compareGraph
- graph- Returns:
- stock graph
-
getCompareGraphBalloonColor
- Returns:
- balloon color of comparing graph
-
setCompareGraphBalloonColor
@StudioProperty(type=OPTIONS) public StockGraph setCompareGraphBalloonColor(Color compareGraphBalloonColor) Sets balloon color of comparing graph.- Parameters:
compareGraphBalloonColor
- color- Returns:
- stock graph
-
getCompareGraphBalloonFunction
- Returns:
- JS function
-
setCompareGraphBalloonFunction
Sets JS function. The graph will call it and pass GraphDataItem and AmGraph object to it. This function should return a string which will be displayed in a balloon. This will be used for graphs from compared data sets only. Use balloonFunction for main data set's graphs.- Parameters:
compareGraphBalloonFunction
- JS function- Returns:
- stock graph
-
getCompareGraphBalloonText
- Returns:
- balloon text of comparing graph
-
setCompareGraphBalloonText
Sets balloon text of comparing graph.- Parameters:
compareGraphBalloonText
- text- Returns:
- stock graph
-
getCompareGraphBullet
- Returns:
- bullet of comparing graph
-
setCompareGraphBullet
@StudioProperty(type=OPTIONS, options={"round","square","diamond","triangleUp","triangleDown","triangleLeft","triangleRight","bubble"}) public StockGraph setCompareGraphBullet(String compareGraphBullet) Sets bullet of comparing graph. Possible values are: round, square, diamond, triangleUp, triangleDown, triangleLeft, triangleRight, bubble- Parameters:
compareGraphBullet
- compare graph bullet string- Returns:
- stock graph
-
getCompareGraphBulletBorderAlpha
- Returns:
- opacity of bullet border of comparing graph
-
setCompareGraphBulletBorderAlpha
@StudioProperty @Max(1L) @Min(0L) public @Max(1L) @Min(0L) StockGraph setCompareGraphBulletBorderAlpha(Double compareGraphBulletBorderAlpha) Sets opacity of bullet border of comparing graph.- Parameters:
compareGraphBulletBorderAlpha
- opacity- Returns:
- stock graph
-
getCompareGraphBulletBorderColor
- Returns:
- color of bullet border of comparing graph
-
setCompareGraphBulletBorderColor
@StudioProperty(type=OPTIONS) public StockGraph setCompareGraphBulletBorderColor(Color compareGraphBulletBorderColor) Sets color of bullet border of comparing graph.- Parameters:
compareGraphBulletBorderColor
- color- Returns:
- stock graph
-
getCompareGraphBulletBorderThickness
- Returns:
- thickness of bullet border of comparing graph
-
setCompareGraphBulletBorderThickness
@StudioProperty public StockGraph setCompareGraphBulletBorderThickness(Integer compareGraphBulletBorderThickness) Sets thickness of bullet border of comparing graph.- Parameters:
compareGraphBulletBorderThickness
- thickness- Returns:
- stock graph
-
getCompareGraphBulletColor
- Returns:
- color of compared graphs bullets
-
setCompareGraphBulletColor
@StudioProperty(type=OPTIONS) public StockGraph setCompareGraphBulletColor(Color compareGraphBulletColor) Sets color of compared graphs bullets.- Parameters:
compareGraphBulletColor
- color- Returns:
- stock graph
-
getCompareGraphBulletSize
- Returns:
- bullet size of comparing graph
-
setCompareGraphBulletSize
Sets bullet size of comparing graph.- Parameters:
compareGraphBulletSize
- bullet size- Returns:
- stock graph
-
getCompareGraphCornerRadiusTop
- Returns:
- corner radius of comparing graph
-
setCompareGraphCornerRadiusTop
@StudioProperty public StockGraph setCompareGraphCornerRadiusTop(Integer compareGraphCornerRadiusTop) Sets corner radius of comparing graph (if type is "column").- Parameters:
compareGraphCornerRadiusTop
- corner radius- Returns:
- stock graph
-
getCompareGraphDashLength
- Returns:
- dash length of compare graph
-
setCompareGraphDashLength
Sets dash length of compare graph.- Parameters:
compareGraphDashLength
- dash length- Returns:
- stock graph
-
getCompareGraphFillAlphas
- Returns:
- fill alpha of comparing graph
-
setCompareGraphFillAlphas
@StudioProperty @Max(1L) @Min(0L) public @Max(1L) @Min(0L) StockGraph setCompareGraphFillAlphas(Double compareGraphFillAlphas) Sets fill alpha of comparing graph.- Parameters:
compareGraphFillAlphas
- fill alpha- Returns:
- stock graph
-
getCompareGraphFillColors
- Returns:
- list of fill colors of comparing graph
-
setCompareGraphFillColors
Sets list of fill colors of comparing graph.- Parameters:
compareGraphFillColors
- list of fill colors- Returns:
- stock graph
-
getCompareGraphLineAlpha
- Returns:
- opacity of comparing graph line
-
setCompareGraphLineAlpha
@StudioProperty @Max(1L) @Min(0L) public @Max(1L) @Min(0L) StockGraph setCompareGraphLineAlpha(Double compareGraphLineAlpha) Sets opacity of comparing graph line.- Parameters:
compareGraphLineAlpha
- opacity- Returns:
- stock graph
-
getCompareGraphLineColor
- Returns:
- color of compare graph
-
setCompareGraphLineColor
@StudioProperty(type=OPTIONS) public StockGraph setCompareGraphLineColor(Color compareGraphLineColor) Sets color of compare graph (by default data set color is used).- Parameters:
compareGraphLineColor
- color- Returns:
- stock graph
-
getCompareGraphLineThickness
- Returns:
- thickness of compare graph
-
setCompareGraphLineThickness
Sets thickness of compare graph.- Parameters:
compareGraphLineThickness
- thickness- Returns:
- stock graph
-
getCompareGraphType
- Returns:
- type of comparing graph
-
setCompareGraphType
@StudioProperty(type=ENUMERATION, defaultValue="LINE") public StockGraph setCompareGraphType(GraphType compareGraphType) Sets type of comparing graph. Possible values are: "line", "column", "step", "smoothedLine". If not set the default value is LINE.- Parameters:
compareGraphType
- type- Returns:
- stock graph
-
getCompareGraphVisibleInLegend
- Returns:
- true if compare graph is visible in legend
-
setCompareGraphVisibleInLegend
@StudioProperty(defaultValue="true") public StockGraph setCompareGraphVisibleInLegend(Boolean compareGraphVisibleInLegend) Set compareGraphVisibleInLegend to false if compare graph shouldn't be visible in legend. If not set the default value is true.- Parameters:
compareGraphVisibleInLegend
- compareGraphVisibleInLegend option- Returns:
- stock graph
-
getPeriodValue
- Returns:
- period value
-
setPeriodValue
Sets period value. When data is grouped to periods, the graph must know which period value should be used.- Parameters:
periodValue
- period value- Returns:
- stock graph
-
getRecalculateValue
- Returns:
- recalculate value
-
setRecalculateValue
@StudioProperty(type=ENUMERATION) public StockGraph setRecalculateValue(StockGraphValue recalculateValue) Sets recalculate value. Possible values are "open", "close", "high", "low", "average" and "sum". There is no default value set – graph uses its periodValue when calculating changes. For example, the graph’s periodValue is "close". This means that when data is grouped to longer periods (months for example) when recalculating, the graph will use "close" value of the first period of the selection as base value and will compare each months "close" value to it. If you set recalculateValue to "open", the first value of a month will be used as base value.- Parameters:
recalculateValue
- recalculate value- Returns:
- stock graph
-
getShowEventsOnComparedGraphs
- Returns:
- true if events of compared graphs is shown
-
setShowEventsOnComparedGraphs
@StudioProperty(defaultValue="false") public StockGraph setShowEventsOnComparedGraphs(Boolean showEventsOnComparedGraphs) Set showEventsOnComparedGraphs to true if events of compared graphs should be shown. If not set the default value is false.- Parameters:
showEventsOnComparedGraphs
- showEventsOnComparedGraphs option- Returns:
- stock graph
-
getUseDataSetColors
- Returns:
- true if data set color is used as this graph's lineColor
-
setUseDataSetColors
@StudioProperty(defaultValue="true") public StockGraph setUseDataSetColors(Boolean useDataSetColors) Specifies whether data set color should be used as this graph's lineColor. By default all graphs from the same data set will have a color from its relative DataSet (either auto-assigned by chart or set by color parameter). The graph's color properties will be ignored. To disable this behavior, set useDataSetColors to false. This way the chart will use graph's own color settings, such as "lineColor" or auto-assign the color if those are not set. If not set the default value is true.- Parameters:
useDataSetColors
- useDataSetColors option- Returns:
- stock graph
-
getWiredFields
- Overrides:
getWiredFields
in classAbstractGraph<StockGraph>
- Returns:
- fields of the
DataItem
that are bound to the graph
-