java.lang.Object
org.rrd4j.graph.PlotElement
org.rrd4j.graph.Rule
org.rrd4j.graph.HRule
Represents a horizontal rule in RRD graphs. Draws a horizontal line at a specific value across the graph with optional legend.
Field Summary
FieldsModifier and TypeFieldDescription(package private) final doubleThe value at which to draw the horizontal ruleFields inherited from class Rule
legend, strokeModifier and TypeFieldDescription(package private) final LegendTextLegend text for this rule(package private) final BasicStrokeStroke style for drawing the rule lineFields inherited from class PlotElement
colorConstructor Summary
ConstructorsConstructorDescriptionHRule(double value, Paint color, LegendText legend, BasicStroke stroke) Creates a horizontal rule at the specified value.Method Summary
All MethodsModifier and TypeMethodDescription(package private) voidsetLegendVisibility(double minval, double maxval, boolean forceLegend) Sets legend visibility based on value range and force setting.
Field Details
value
final double valueThe value at which to draw the horizontal rule
Constructor Details
HRule
HRule(double value, Paint color, LegendText legend, BasicStroke stroke) Creates a horizontal rule at the specified value.- Parameters:
value- the y-axis value for the rulecolor- color for the rule linelegend- optional legend textstroke- stroke style for the line
Method Details
setLegendVisibility
void setLegendVisibility(double minval, double maxval, boolean forceLegend) Sets legend visibility based on value range and force setting.- Parameters:
minval- minimum value rangemaxval- maximum value rangeforceLegend- if true, legend is always visible