Package com.inet.report.chart.axis
Class LineMarker
- java.lang.Object
-
- com.inet.report.chart.axis.AbstractMarker
-
- com.inet.report.chart.axis.LineMarker
-
- All Implemented Interfaces:
java.io.Serializable
public class LineMarker extends AbstractMarker
Class to create line markers in a chart plot. A line has one value for the position, and is drawn perpendicular to its axis- Since:
- 8.0
- See Also:
AbstractMarker
, Serialized Form
-
-
Field Summary
-
Fields inherited from class com.inet.report.chart.axis.AbstractMarker
DEFAULT_ALPHA, DEFAULT_COLOR, DEFAULT_LINE_STYLE, DEFAULT_LINE_WIDTH, DEFAULT_VALUE
-
-
Constructor Summary
Constructors Constructor Description LineMarker()
Creates a line marker on the 0 line of current chart axis.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected java.lang.StringBuilder
getSubProperties(int depth)
Returns the serialized properties of subclasses.double
getValue()
Returns the value (position) of this marker.FormulaField
getValueFormula()
Get the Formula for the value of the marker.boolean
isValueFormulaDate()
Get whether the valueFormulam returns Datevoid
readProperties(org.w3c.dom.Element element, Chart2 chart)
Loads the XML properties of a marker.void
setValue(double value)
Sets the value (position) for this marker.void
setValueFormula(FormulaField valueFormula, boolean isDate)
Set the Formula which returns the value for the marker.
Expected type is NUMBER or datetime.-
Methods inherited from class com.inet.report.chart.axis.AbstractMarker
getColor, getLineStyle, getLineWidth, getMarkerReferencesIfExist, setColor, setLineStyle, setLineWidth
-
-
-
-
Method Detail
-
getValue
public double getValue()
Returns the value (position) of this marker.- Returns:
- the position of this marker
- Since:
- 8.0
- See Also:
setValue(double)
-
setValue
public void setValue(double value)
Sets the value (position) for this marker.- Parameters:
value
- the position- Since:
- 8.0
- See Also:
getValue()
-
getSubProperties
protected java.lang.StringBuilder getSubProperties(int depth)
Returns the serialized properties of subclasses.- Overrides:
getSubProperties
in classAbstractMarker
- Parameters:
depth
- the depth of XML indent- Returns:
- the properties.
-
readProperties
public void readProperties(org.w3c.dom.Element element, Chart2 chart)
Loads the XML properties of a marker.- Overrides:
readProperties
in classAbstractMarker
- Parameters:
element
- DOM element to read marker properties fromchart
- the Chart this marker belongs to, not null
-
setValueFormula
public void setValueFormula(FormulaField valueFormula, boolean isDate)
Set the Formula which returns the value for the marker.
Expected type is NUMBER or datetime.- Parameters:
valueFormula
- the new value-formulaisDate
- true when this is for a date-axis, so the return type of the formula is DateTime, otherwise it is NUMBER- Throws:
java.lang.IllegalArgumentException
- if the given formula has a different type thanFORMULA_PROPERTY
- Since:
- 11.3
-
getValueFormula
public FormulaField getValueFormula()
Get the Formula for the value of the marker.- Returns:
- the formula for the marker, can be null
- Since:
- 11.3
-
isValueFormulaDate
public boolean isValueFormulaDate()
Get whether the valueFormulam returns Date- Returns:
- the valueFormulaDate
- Since:
- 11.3
-
-