java.lang.Object
org.rrd4j.graph.PlotElement
org.rrd4j.graph.SourcedPlotElement
org.rrd4j.graph.Line
- Direct Known Subclasses:
ConstantLine
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 Summary
FieldsModifier and TypeFieldDescription(package private) final BasicStrokeStroke definition for line rendering(package private) final Color[]Bottom-to-top colour stops shading this line by its value, or null for a flat line.Fields 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
ConstructorsConstructorDescriptionLine(String srcName, Paint color, BasicStroke stroke, SourcedPlotElement parent) Create an unshaded line.Line(String srcName, Paint color, BasicStroke stroke, SourcedPlotElement parent, Color[] valueShade) Create a line, optionally shaded by its value.Method Summary
Methods inherited from class SourcedPlotElement
assignValues, getMaxValue, getMinValue, getParentColor, getValues, stackValuesModifier and TypeMethodDescription(package private) voidassignValues(DataProcessor dproc) Assign values from the data processor.(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
stroke
Stroke definition for line renderingvalueShade
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 plotscolor- the stroke colourstroke- the stroke used to draw the lineparent- 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 plotscolor- the stroke colourstroke- the stroke used to draw the lineparent- the plot element this line belongs tovalueShade- the bottom-to-top colour stops, or null for a flat line