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 Details

    • ReferenceLine

      public ReferenceLine​(String label, double value, float lineWidth, Color lineColor)
      Create a new reference line.
      Parameters:
      label - the label of the reference line
      value - the value of the reference line
      lineWidth - the line width, has to non-negative
      lineColor - the line color
      Throws:
      IllegalArgumentException - line width has to be non-negative
  • Method Details

    • getLabel

      public String getLabel()
      Return the label.
      Returns:
      the label
    • setLabel

      public void setLabel​(String label)
      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

      public Color getLineColor()
      Set the line color.
      Returns:
      the lineColor
    • setLineColor

      public void setLineColor​(Color lineColor)
      Set the line color.
      Parameters:
      lineColor - the lineColor to set