java.lang.Object
org.rrd4j.graph.PlotElement
org.rrd4j.graph.SourcedPlotElement
org.rrd4j.graph.Area
org.rrd4j.graph.ConstantArea
Represents an area plot element with a constant value in RRD graphs. Extends Area to provide filled areas with fixed values across all data points. Useful for showing reference levels, thresholds, or baseline areas.
Field Summary
FieldsFields inherited from class SourcedPlotElement
parent, srcName, valuesModifier and TypeFieldDescription(package private) final SourcedPlotElementThe parent element, or null.(package private) final StringThe source name.(package private) double[]The values.Fields inherited from class PlotElement
colorConstructor Summary
ConstructorsConstructorDescriptionConstantArea(double value, Paint color, SourcedPlotElement parent) Creates a constant area with the specified value, color, and parent.Method Summary
All MethodsModifier and TypeMethodDescription(package private) voidassignValues(DataProcessor dproc) Assigns constant values to all data points, optionally stacking with parent values.Methods inherited from class SourcedPlotElement
getMaxValue, getMinValue, getParentColor, getValues, stackValuesModifier and TypeMethodDescription(package private) doubleGet the maximum value.(package private) doubleGet the minimum value.(package private) PaintGet the parent's color.(package private) double[]Get the values.(package private) double[]stackValues(DataProcessor dproc) Stack values on top of parent values.
Field Details
value
private final double valueThe constant value for this area
Constructor Details
ConstantArea
ConstantArea(double value, Paint color, SourcedPlotElement parent) Creates a constant area with the specified value, color, and parent.- Parameters:
value- the constant value for all data pointscolor- the fill color for the areaparent- the parent plot element for stacking
Method Details
assignValues
Assigns constant values to all data points, optionally stacking with parent values.- Overrides:
assignValuesin classSourcedPlotElement- Parameters:
dproc- the data processor for value assignment