Class ReferenceLine
java.lang.Object
no.uib.jsparklines.renderers.util.ReferenceLine
public class ReferenceLine extends Object
Reference line that can be added to a chart.
- Author:
- Harald Barsnes
-
Constructor Summary
Constructors Constructor Description ReferenceLine(String label, double value, float lineWidth, Color lineColor)
Create a new reference line. -
Method Summary
Modifier and Type Method Description String
getLabel()
Return the label.Color
getLineColor()
Set the line color.float
getLineWidth()
Return the line width.double
getValue()
Get the value.void
setLabel(String label)
Set the label.void
setLineColor(Color lineColor)
Set the line color.void
setLineWidth(float lineWidth)
Set the line width,void
setValue(double value)
Set the value.
-
Constructor Details
-
ReferenceLine
Create a new reference line.- Parameters:
label
- the label of the reference linevalue
- the value of the reference linelineWidth
- the line width, has to non-negativelineColor
- the line color- Throws:
IllegalArgumentException
- line width has to be non-negative
-
-
Method Details
-
getLabel
Return the label.- Returns:
- the label
-
setLabel
Set the label.- Parameters:
label
- the label to set
-
getValue
public double getValue()Get the value.- Returns:
- the value
-
setValue
public void setValue(double value)Set the value.- Parameters:
value
- the value to set
-
getLineWidth
public float getLineWidth()Return the line width.- Returns:
- the lineWidth
-
setLineWidth
public void setLineWidth(float lineWidth)Set the line width,- Parameters:
lineWidth
- the lineWidth to set
-
getLineColor
Set the line color.- Returns:
- the lineColor
-
setLineColor
Set the line color.- Parameters:
lineColor
- the lineColor to set
-