Package io.jmix.charts.model.trendline
Class TrendLine
java.lang.Object
io.jmix.charts.model.AbstractChartObject
io.jmix.charts.model.trendline.TrendLine
- All Implemented Interfaces:
Serializable
Creates a trendline for
SerialChartModelImpl
and XYChartModelImpl
charts which indicates the trend of your data or
covers some different purposes. Multiple can be assigned.
See documentation for properties of TrendLine JS Object.
http://docs.amcharts.com/3/javascriptcharts/TrendLine
- See Also:
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptiongetId()
setBalloonText
(String balloonText) Sets balloon text.setDashLength
(Integer dashLength) Sets dash length.setFinalCategory
(String finalCategory) Sets string, equal to category value to which trend line should be drawn.setFinalDate
(Date finalDate) Sets date to which trend line should be drawn.setFinalImage
(Image finalImage) Sets an image to the end of a trend line.setFinalValue
(Double finalValue) Sets value at which trend line should end.setFinalXValue
(Double finalXValue) Sets X value at which trend line should end.Sets unique id of a trend line.setInitialCategory
(String initialCategory) Sets string equal to category value from which trend line should start.setInitialDate
(Date initialDate) Sets date from which trend line should start.setInitialImage
(Image initialImage) Sets an image to the beginning of a trend line.setInitialValue
(Double initialValue) Sets value from which trend line should start.setInitialXValue
(Double initialXValue) Sets X value from which trend line should start.@Max(1L) @Min(0L) TrendLine
setLineAlpha
(Double lineAlpha) Sets line opacity.setLineColor
(Color lineColor) Sets line color.setLineThickness
(Integer lineThickness) Sets line thickness.setProtected
(Boolean aProtected) Set isProtected to true if trend line shouldn't be removed when clicked on eraser tool.setValueAxis
(String valueAxis) Sets value axis of the trend line.setValueAxisX
(String valueAxisX) Sets X axis of the trend line.
-
Constructor Details
-
TrendLine
public TrendLine()
-
-
Method Details
-
getBalloonText
- Returns:
- balloon text
-
setBalloonText
Sets balloon text. When set, enables displaying a roll-over balloon.- Parameters:
balloonText
- balloon text- Returns:
- trend line
-
getDashLength
- Returns:
- dash length
-
setDashLength
Sets dash length. If not set the default value is 0.- Parameters:
dashLength
- dash length- Returns:
- trend line
-
getFinalCategory
- Returns:
- final category string
-
setFinalCategory
Sets string, equal to category value to which trend line should be drawn. It should be used if chart doesn't parse dates.- Parameters:
finalCategory
- final category string- Returns:
- trend line
-
getFinalDate
- Returns:
- date to which trend line should be drawn
-
setFinalDate
Sets date to which trend line should be drawn.- Parameters:
finalDate
- final date- Returns:
- trend line
-
getFinalValue
- Returns:
- value at which trend line is end
-
setFinalValue
Sets value at which trend line should end.- Parameters:
finalValue
- final value- Returns:
- trend line
-
getFinalXValue
- Returns:
- X value at which trend line is end
-
setFinalXValue
Sets X value at which trend line should end. Used by XY chart only.- Parameters:
finalXValue
- final X value- Returns:
- trend line
-
getInitialCategory
- Returns:
- string equal to category value from which trend line should start
-
setInitialCategory
Sets string equal to category value from which trend line should start. It should be used if chart doesn't parse dates.- Parameters:
initialCategory
- initial category- Returns:
- trend line
-
getInitialDate
- Returns:
- date from which trend line should start
-
setInitialDate
Sets date from which trend line should start.- Parameters:
initialDate
- initial date- Returns:
- trend line
-
getInitialValue
- Returns:
- value from which trend line should start
-
setInitialValue
Sets value from which trend line should start.- Parameters:
initialValue
- initial value- Returns:
- trend line
-
getInitialXValue
- Returns:
- X value from which trend line should start
-
setInitialXValue
Sets X value from which trend line should start. Used by XY chart only- Parameters:
initialXValue
- initial X value- Returns:
- trend line
-
getProtected
- Returns:
- true if isProtected is enabled
-
setProtected
Set isProtected to true if trend line shouldn't be removed when clicked on eraser tool. Used by stock chart. If not set the default value is false.- Parameters:
aProtected
- isProtected option- Returns:
- trend line
-
getLineAlpha
- Returns:
- line opacity
-
setLineAlpha
@StudioProperty(defaultValue="1") @Max(1L) @Min(0L) public @Max(1L) @Min(0L) TrendLine setLineAlpha(Double lineAlpha) Sets line opacity. If not set the default value is 1.- Parameters:
lineAlpha
- opacity- Returns:
- trend line
-
getLineColor
- Returns:
- line color
-
setLineColor
@StudioProperty(type=OPTIONS, defaultValue="#00CC00") public TrendLine setLineColor(Color lineColor) Sets line color. If not set the default value is #00CC00.- Parameters:
lineColor
- color- Returns:
- trend line
-
getLineThickness
- Returns:
- line thickness
-
setLineThickness
Sets line thickness. If not set the default value is 1.- Parameters:
lineThickness
- thickness- Returns:
- trend line
-
getValueAxis
- Returns:
- value axis id
-
setValueAxis
Sets value axis of the trend line. Will use first value axis of the chart if not set any.- Parameters:
valueAxis
- value axis id- Returns:
- trend line
-
getValueAxisX
- Returns:
- value axis X id
-
setValueAxisX
Sets X axis of the trend line. Will use first X axis of the chart if not set any. Used by XY chart only.- Parameters:
valueAxisX
- value axis X id- Returns:
- trend line
-
getId
- Returns:
- id of a trend line
-
setId
Sets unique id of a trend line.- Parameters:
id
- id- Returns:
- trend line
-
getFinalImage
- Returns:
- final image
-
setFinalImage
Sets an image to the end of a trend line.- Parameters:
finalImage
- final image- Returns:
- trend line
-
getInitialImage
- Returns:
- initial image
-
setInitialImage
Sets an image to the beginning of a trend line.- Parameters:
initialImage
- initial image- Returns:
- trend line
-