class Stackextends SourcedPlotElement
Represents a stacked plot element in RRD graphs. Extends SourcedPlotElement to stack values on top of a parent element for cumulative graphing. Enables creation of stacked area and line charts showing cumulative totals.
  • Constructor Details

    • Stack

      Stack(SourcedPlotElement parent, String srcName, Paint color)
      Creates a stacked plot element with the specified parent, source name, and color.
      Parameters:
      parent - the parent plot element to stack on top of
      srcName - the name of the data source
      color - the color for this stacked element
  • Method Details

    • assignValues

      void assignValues(DataProcessor dproc)
      Assigns values by stacking this element's data on top of parent values. Handles NaN values appropriately to maintain data integrity.
      Overrides:
      assignValues in class SourcedPlotElement
      Parameters:
      dproc - the data processor containing source values
    • getParentLineWidth

      float getParentLineWidth()
      Gets the line width of the parent element. Returns -1 for area elements (indicating no line width).
      Returns:
      parent line width, or -1 for area elements
    • getParentColor

      Paint getParentColor()
      Gets the color of the parent element.
      Overrides:
      getParentColor in class SourcedPlotElement
      Returns:
      parent element's color