public class ConstantLineextends Line
Represents a line plot element with a constant value in RRD graphs. Extends Line to provide horizontal lines with fixed values across all data points. Useful for showing reference lines, thresholds, or target values.
  • Field Details

    • value

      private final double value
      The constant value for this line
  • Constructor Details

    • ConstantLine

      ConstantLine(double value, Paint color, BasicStroke stroke, SourcedPlotElement parent)
      Creates a constant line with the specified value, color, stroke, and parent.
      Parameters:
      value - the constant value for all data points
      color - the line color
      stroke - the line stroke style
      parent - the parent plot element for stacking
  • Method Details

    • assignValues

      void assignValues(DataProcessor dproc)
      Assigns constant values to all data points, optionally stacking with parent values.
      Overrides:
      assignValues in class SourcedPlotElement
      Parameters:
      dproc - the data processor for value assignment