Direct Known Subclasses:
ConstantLine

class Lineextends SourcedPlotElement
Represents a line plot element in RRD graphs. Draws lines connecting data points with specified stroke and color. Lines are used to show trends and connect individual data points in the graph.
  • Field Details

    • stroke

      final BasicStroke stroke
      Stroke definition for line rendering
    • valueShade

      final Color[] valueShade
      Bottom-to-top colour stops shading this line by its value, or null for a flat line.

      Per line rather than per graph so two plots on one axis are shaded independently, the same way their colours are. The span is built by the renderer, which is the only party that knows where the plot area ended up.

  • Constructor Details

    • Line

      Line(String srcName, Paint color, BasicStroke stroke, SourcedPlotElement parent)
      Create an unshaded line.
      Parameters:
      srcName - the name of the data source this line plots
      color - the stroke colour
      stroke - the stroke used to draw the line
      parent - the plot element this line belongs to
    • Line

      Line(String srcName, Paint color, BasicStroke stroke, SourcedPlotElement parent, Color[] valueShade)
      Create a line, optionally shaded by its value.
      Parameters:
      srcName - the name of the data source this line plots
      color - the stroke colour
      stroke - the stroke used to draw the line
      parent - the plot element this line belongs to
      valueShade - the bottom-to-top colour stops, or null for a flat line