org.rrd4j.graph

## Class RrdGraphDef

- java.lang.Object
- - org.rrd4j.graph.RrdGraphDef

- All Implemented Interfaces:
    DataHolder, RrdGraphConstants

      public class RrdGraphDef
      extends Object
      implements RrdGraphConstants, DataHolder

  Class which should be used to define new Rrd4j graph. Once constructed and populated with data object of this class should be passed to the constructor of the `RrdGraph` class which will actually create the graph.

  The text printed below the actual graph can be formated by appending special escaped characters at the end of a text. When ever such a character occurs, all pending text is pushed onto the graph according to the character specified.

  Valid markers are: \j for justified, \l for left aligned, \r for right aligned and \c for centered.

  Normally there are two space characters inserted between every two items printed into the graph. The space following a string can be suppressed by putting a \g at the end of the string. The \g also squashes any space inside the string if it is at the very end of the string. This can be used in connection with %s to suppress empty unit strings.

  A special case is COMMENT:\s this inserts some additional vertical space before placing the next row of legends.

  When text has to be formated without special instructions from your side, RRDTool will automatically justify the text as soon as one string goes over the right edge. If you want to prevent the justification without forcing a newline, you can use the special tag \J at the end of the string to disable the auto justification.

- - ### Nested Class Summary

    Nested Classes
    Modifier and Type | Class and Description
    --- | ---
    `static interface` | `RrdGraphDef.ImageSource` Implementations of this class can be used to generate image than can be layered on graph.

    - ### Nested classes/interfaces inherited from interface org.rrd4j.graph.RrdGraphConstants

      `RrdGraphConstants.FontConstructor, RrdGraphConstants.FontTag`

  - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `(package private) boolean` | `altAutoscale`
    `(package private) boolean` | `altAutoscaleMax`
    `(package private) boolean` | `altAutoscaleMin`
    `(package private) boolean` | `altYGrid`
    `(package private) boolean` | `altYMrtg`
    `(package private) boolean` | `antiAliasing`
    `(package private) RrdGraphDef.ImageSource` | `backgroundImage`
    `(package private) double` | `base`
    `(package private) RrdGraphDef.ImageSource` | `canvasImage`
    `(package private) List<CommentText>` | `comments`
    `(package private) DownSampler` | `downsampler`
    `(package private) boolean` | `drawXGrid`
    `(package private) boolean` | `drawYGrid`
    `(package private) long` | `endTime`
    `(package private) String` | `filename`
    `(package private) int` | `firstDayOfWeek`
    `(package private) Font[]` | `fonts`
    `(package private) boolean` | `forceRulesLegend`
    `(package private) java.util.function.Function<TimeUnit,Optional<TimeLabelFormat>>` | `formatProvider`
    `(package private) Stroke` | `gridStroke`
    `(package private) int` | `height`
    `(package private) String` | `imageFormat`
    `(package private) String` | `imageInfo`
    `(package private) float` | `imageQuality`
    `(package private) boolean` | `interlaced`
    `(package private) boolean` | `lazy`
    `(package private) Locale` | `locale`
    `(package private) boolean` | `logarithmic`
    `(package private) double` | `maxValue`
    `(package private) double` | `minValue`
    `(package private) boolean` | `noLegend`
    `(package private) boolean` | `noMinorGrid`
    `(package private) boolean` | `onlyGraph`
    `(package private) RrdGraphDef.ImageSource` | `overlayImage`
    `(package private) List<PlotElement>` | `plotElements`
    `(package private) boolean` | `poolUsed`
    `(package private) boolean` | `rigid`
    `(package private) boolean` | `showSignature`
    `(package private) String` | `signature`
    `(package private) List<Source>` | `sources`
    `(package private) long` | `startTime`
    `(package private) long` | `step`
    `(package private) boolean` | `textAntiAliasing`
    `(package private) Stroke` | `tickStroke`
    `(package private) TimeAxisSetting` | `timeAxisSetting`
    `(package private) TimeLabelFormat` | `timeLabelFormat`
    `(package private) String` | `title`
    `(package private) TimeZone` | `tz`
    `(package private) String` | `unit`
    `(package private) int` | `unitsExponent`
    `(package private) int` | `unitsLength`
    `(package private) ValueAxisSetting` | `valueAxisSetting`
    `(package private) String` | `verticalLabel`
    `(package private) int` | `width`

    - ### Fields inherited from interface org.rrd4j.graph.RrdGraphConstants

      `ALIGN_CENTER_MARKER, ALIGN_JUSTIFIED_MARKER, ALIGN_LEFT_MARKER, ALIGN_LEFTNONL_MARKER, ALIGN_RIGHT_MARKER, BLIND_COLOR, COLOR_ARROW, COLOR_BACK, COLOR_CANVAS, COLOR_FONT, COLOR_FRAME, COLOR_GRID, COLOR_MGRID, COLOR_SHADEA, COLOR_SHADEB, COLOR_XAXIS, COLOR_YAXIS, DAY, DEFAULT_ARROW_COLOR, DEFAULT_BACK_COLOR, DEFAULT_BASE, DEFAULT_CANVAS_COLOR, DEFAULT_END, DEFAULT_FONT_COLOR, DEFAULT_FRAME_COLOR, DEFAULT_GRID_COLOR, DEFAULT_HEIGHT, DEFAULT_IMAGE_FORMAT, DEFAULT_IMAGE_QUALITY, DEFAULT_LARGE_FONT, DEFAULT_MGRID_COLOR, DEFAULT_SHADEA_COLOR, DEFAULT_SHADEB_COLOR, DEFAULT_SMALL_FONT, DEFAULT_START, DEFAULT_UNITS_LENGTH, DEFAULT_WIDTH, DEFAULT_XAXIS_COLOR, DEFAULT_YAXIS_COLOR, FIRST_DAY_OF_WEEK, FONTTAG_AXIS, FONTTAG_DEFAULT, FONTTAG_LEGEND, FONTTAG_TITLE, FONTTAG_UNIT, FONTTAG_WATERMARK, FRIDAY, GATOR_FONT, GLUE_MARKER, GRID_STROKE, HH_MM, HOUR, IN_MEMORY_IMAGE, LEGEND_BOX, LEGEND_BOX_SPACE, LEGEND_INTERSPACING, LEGEND_LEADING, LEGEND_LEADING_SMALL, MINUTE, MONDAY, MONTH, NO_JUSTIFICATION_MARKER, PADDING_BOTTOM, PADDING_LEFT, PADDING_LEGEND, PADDING_PLOT, PADDING_RIGHT, PADDING_TITLE, PADDING_TOP, PADDING_VLABEL, PROPERTYFONTBOLD, PROPERTYFONTBOLDURL, PROPERTYFONTPLAIN, PROPERTYFONTPLAINURL, PROPERTYFONTSPROPERTIES, PROPERTYFONTSURL, SATURDAY, SECOND, SUNDAY, THURSDAY, TICK_STROKE, TUESDAY, VERTICAL_SPACING_MARKER, WEDNESDAY, WEEK, YEAR`

    - ### Fields inherited from interface org.rrd4j.core.DataHolder

      `DEFAULT_POOL_USAGE_POLICY`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `RrdGraphDef(long t1, long t2)` Creates RrdGraphDef object.
    `RrdGraphDef(java.time.temporal.TemporalAmount d)` Creates new DataProcessor object for the given time duration.

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `area(double value, Paint color, boolean stack)` Add a area like any other but with a constant value, it can be stacked like any other area
    `void` | `area(String srcName, Paint color)` Plots requested data in the form of the filled area starting from zero, using the color specified.
    `void` | `area(String srcName, Paint color, String legend)` Plots requested data in the form of the filled area starting from zero, using the color specified.
    `void` | `area(String srcName, Paint color, String legend, boolean stack)` Plots requested data in the form of the filled area starting from zero, using the color specified.
    `void` | `comment(String text)` Comment to be printed on the graph.
    `void` | `datasource(String name, FetchData fetchData)` Creates a new 'fetched' datasource.
    `void` | `datasource(String name, IPlottable plottable)` Creates a new (plottable) datasource.
    `void` | `datasource(String name, String rpnExpression)` Create a new virtual datasource by evaluating a mathematical expression, specified in Reverse Polish Notation (RPN).
    `void` | `datasource(String name, String dsName, FetchData fetchData)` Creates a new 'fetched' datasource.
    `void` | `datasource(String name, String rrdPath, String dsName, ConsolFun consolFun)` Defines virtual datasource.
    `void` | `datasource(String name, String rrdPath, String dsName, ConsolFun consolFun, RrdBackendFactory backend)` Defines virtual datasource.
    `void` | `datasource(String name, String defName, Variable var)` Creates a datasource that performs a variable calculation on an another named datasource to yield a single combined timestamp/value.
    `void` | `datasource(String name, URI rrdUri, String dsName, ConsolFun consolFun)` Defines virtual datasource.
    `void` | `datasource(String name, URI rrdUri, String dsName, ConsolFun consolFun, RrdBackendFactory backend)` Defines virtual datasource.
    `(package private) boolean` | `drawTicks()`
    `(package private) Paint` | `getColor(ElementsNames element)`
    `long` | `getEndTime()` Returns ending timestamp.
    `Font` | `getFont(RrdGraphConstants.FontTag tag)`
    `RrdDbPool` | `getPool()`
    `String` | `getSignature()` Gets the signature string that runs along the right-side of the graph.
    `long` | `getStartTime()` Returns starting timestamp.
    `long` | `getStep()` Returns the time step used for timestamp interval.
    `TimeZone` | `getTimeZone()`
    `void` | `gprint(String srcName, String format)` Read the value of a variable (VDEF) and prints the value by using the given format string.
    `void` | `gprint(String srcName, String format, boolean strftime)` Read the value of a variable (VDEF) and prints the the value or the time stamp, according to the strftime flag by using the given format string.
    `void` | `hrule(double value, Paint color)` Draws a horizontal rule into the graph.
    `void` | `hrule(double value, Paint color, String legend)` Draws a horizontal rule into the graph and optionally adds a legend.
    `void` | `hrule(double value, Paint color, String legend, BasicStroke stroke)` Draws a horizontal rule into the graph and optionally adds a legend.
    `void` | `hrule(double value, Paint color, String legend, float width)` Draws a horizontal rule into the graph and optionally adds a legend.
    `void` | `hspan(double start, double end, Paint color)` Draws a horizontal span into the graph.
    `void` | `hspan(double start, double end, Paint color, String legend)` Draws a horizontal span into the graph and optionally adds a legend.
    `boolean` | `isPoolUsed()` Returns boolean value representing `RrdDbPool` usage policy.
    `void` | `line(double value, Paint color, BasicStroke stroke, boolean stack)` Define a line like any other but with constant value, it can be stacked
    `void` | `line(double value, Paint color, float width, boolean stack)` Define a line like any other but with constant value, it can be stacked
    `void` | `line(String srcName, Paint color)` Plots requested data as a line, using the color specified.
    `void` | `line(String srcName, Paint color, float width)` Plots requested data as a line, using the color and the line width specified.
    `void` | `line(String srcName, Paint color, String legend)` Plots requested data as a line, using the color specified.
    `void` | `line(String srcName, Paint color, String legend, BasicStroke stroke, boolean stack)` Plots requested data as a line, using the color and the `BasicStroke` specified.
    `void` | `line(String srcName, Paint color, String legend, float width)` Plots requested data as a line, using the color and the line width specified.
    `void` | `line(String srcName, Paint color, String legend, float width, boolean stack)` Plots requested data as a line, using the color and the line width specified.
    `void` | `print(String srcName, String format)` Read the value of a variable (VDEF) and prints the value by using the given format string.
    `void` | `print(String srcName, String format, boolean strftime)` Read the value of a variable (VDEF) and prints the the value or the time stamp, according to the strftime flag by using the given format string.
    `(package private) int` | `printStatementCount()`
    `void` | `setAltAutoscale(boolean altAutoscale)` Computes Y range based on function absolute minimum and maximum values.
    `void` | `setAltAutoscaleMax(boolean altAutoscaleMax)` Computes Y range based on function absolute minimum and maximum values.
    `void` | `setAltAutoscaleMin(boolean altAutoscaleMin)` Computes Y range based on function absolute minimum and maximum values.
    `void` | `setAltYGrid(boolean altYGrid)` Places Y grid dynamically based on graph Y range.
    `void` | `setAltYMrtg(boolean altYMrtg)` Use this method to request MRTG-like graph (false by default)
    `void` | `setAntiAliasing(boolean antiAliasing)` Controls if the chart area of the image should be antialiased or not.
    `void` | `setBackgroundImage(RrdGraphDef.ImageSource backgroundImage)` Sets background image.
    `void` | `setBackgroundImage(String backgroundImage)` Sets background image.
    `void` | `setBackgroundImage(URL backgroundImageUrl)` Sets background image.
    `void` | `setBase(double base)` Sets default base for magnitude scaling.
    `void` | `setCanvasImage(RrdGraphDef.ImageSource canvasImageSource)` Sets canvas background image.
    `void` | `setCanvasImage(String canvasImage)` Sets canvas background image.
    `void` | `setCanvasImage(URL canvasUrl)` Sets canvas background image.
    `void` | `setColor(ElementsNames colorTag, Paint color)` Overrides the colors for the standard elements of the graph.
    `void` | `setColor(int colorTag, Paint color)` Overrides the colors for the standard elements of the graph.
    `void` | `setDownsampler(DownSampler downsampler)` Allows to set a downsampler, used to improved the visual representation of graph.
    `void` | `setDrawXGrid(boolean drawXGrid)` Sets visibility of the X-axis grid.
    `void` | `setDrawYGrid(boolean drawYGrid)` Sets visibility of the Y-axis grid.
    `void` | `setEndTime(long time)` Sets the time when the graph should end.
    `void` | `setFilename(String filename)` Sets the name of the graph to generate.
    `void` | `setFirstDayOfWeek(int firstDayOfWeek)` Sets first day of the week.
    `void` | `setFont(RrdGraphConstants.FontTag fontTag, Font font)` Sets font to be used for a specific font tag.
    `void` | `setFont(RrdGraphConstants.FontTag fontTag, Font font, boolean setAll)` Sets font.
    `void` | `setFont(RrdGraphConstants.FontTag fontTag, Font font, boolean setAll, boolean keepSizes)` Sets font.
    `void` | `setFont(String fontTag, Font font)` Sets font.
    `void` | `setFont(String fontTag, Font font, boolean setAll)` Sets font.
    `void` | `setFont(String fontTag, Font font, boolean setAll, boolean keepSizes)` Sets font.
    `void` | `setFontSet(boolean rrdtool)` This method reset the font set to it's default values.
    `void` | `setForceRulesLegend(boolean forceRulesLegend)` Force the generation of HRULE and VRULE legend even if those HRULE or VRULE will not be drawn because out of graph boundaries.
    `void` | `setGridStroke(Stroke gridStroke)` Set the Stroke used to draw grid
    `void` | `setHeight(int height)` Sets height of the drawing area within the graph.
    `void` | `setImageFormat(String imageFormat)` Sets image format.
    `void` | `setImageInfo(String imageInfo)` Creates additional image information.
    `void` | `setImageQuality(float imageQuality)` Sets image quality.
    `void` | `setInterlaced(boolean interlaced)` Creates interlaced or progressive mode image.
    `void` | `setLazy(boolean lazy)` Creates graph only if the current graph is out of date or not existent.
    `void` | `setLocale(Locale locale)` Set the locale used for the legend.
    `void` | `setLogarithmic(boolean logarithmic)` Sets logarithmic y-axis scaling.
    `void` | `setMaxValue(double maxValue)` Defines the value normally located at the upper border of the graph.
    `void` | `setMinValue(double minValue)` Sets the lower limit of a graph.
    `void` | `setNoLegend(boolean noLegend)` Suppress generation of legend, only render the graph.
    `void` | `setNoMinorGrid(boolean noMinorGrid)` Use this method to turn off minor grid lines (printed by default)
    `void` | `setOnlyGraph(boolean onlyGraph)` Suppresses anything but the graph, works only for height < 64.
    `void` | `setOverlayImage(RrdGraphDef.ImageSource overlayImageSource)` Sets overlay image.
    `void` | `setOverlayImage(String overlayImage)` Sets overlay image.
    `void` | `setOverlayImage(URL overlayImage)` Sets overlay image.
    `void` | `setPool(RrdDbPool pool)` Defines the `RrdDbPool` to use.
    `void` | `setPoolUsed(boolean poolUsed)` Sets RrdDbPool usage policy (defaults to true).
    `void` | `setRigid(boolean rigid)` Sets rigid boundaries mode.
    `void` | `setShowSignature(boolean showSignature)` Shows or hides graph signature (gator) in the top right corner of the graph
    `void` | `setSignature(String signature)` Sets the signature string that runs along the right-side of the graph.
    `void` | `setStartTime(long time)` Sets the time when the graph should begin.
    `void` | `setStep(long step)` Suggests which time step should be used by Rrd4j while processing data from RRD files.
    `void` | `setTextAntiAliasing(boolean textAntiAliasing)` Controls if the text should be antialiased or not.
    `void` | `setTickStroke(Stroke tickStroke)` Set the stroke used to draw ticks
    `void` | `setTimeAxis(int minorUnit, int minorUnitCount, int majorUnit, int majorUnitCount, int labelUnit, int labelUnitCount, int labelSpan, String simpleDateFormat)` Configures x-axis grid and labels.
    `void` | `setTimeAxis(int minorUnit, int minorUnitCount, int majorUnit, int majorUnitCount, int labelUnit, int labelUnitCount, int labelSpan, TimeLabelFormat format)` It configure the x-axis grid in the same way than `setTimeAxis(int, int, int, int, int, int, int, String)`, but it allows to use a `TimeLabelFormat` to format the date label.
    `void` | `setTimeLabelFormat(TimeLabelFormat format)` This allows to keep the default major and minor grid unit, but with changing only the label formatting, using a `TimeLabelFormat`
    `void` | `setTimeLabelFormatter(java.util.function.Function<TimeUnit,Optional<TimeLabelFormat>> formatProvider)` This allows to keep the default major and minor grid unit, but with changing only the label formatting, that will be formatted differently according to `TimeUnit` chosen for the time axis.
    `void` | `setTimeSpan(long[] timestamps)` Sets starting and ending time for the for the graph.
    `void` | `setTimeSpan(long startTime, long endTime)` Sets starting and ending time for the for the graph.
    `void` | `setTimeZone(TimeZone tz)` Set the time zone used for the legend.
    `void` | `setTitle(String title)` Defines a title to be written into the graph.
    `void` | `setUnit(String unit)` Sets unit to be displayed on y axis.
    `void` | `setUnitsExponent(int unitsExponent)` Sets the 10**unitsExponent scaling of the y-axis values.
    `void` | `setUnitsLength(int unitsLength)` Sets the character width on the left side of the graph for y-axis values.
    `void` | `setValueAxis(double gridStep, int labelFactor)` Sets vertical axis grid and labels.
    `void` | `setVerticalLabel(String verticalLabel)` Sets vertical label on the left side of the graph.
    `void` | `setWidth(int width)` Sets width of the drawing area within the graph.
    `(package private) boolean` | `shouldPlot()`
    `void` | `stack(String srcName, Paint color)` Does the same as `line(String, java.awt.Paint)`, but the graph gets stacked on top of the previous LINE, AREA or STACK graph.
    `void` | `stack(String srcName, Paint color, String legend)` Does the same as `line(String, java.awt.Paint, String)`, but the graph gets stacked on top of the previous LINE, AREA or STACK graph.
    `void` | `vrule(long timestamp, Paint color)` Draws a vertical rule into the graph.
    `void` | `vrule(long timestamp, Paint color, String legend)` Draws a vertical rule into the graph and optionally adds a legend
    `void` | `vrule(long timestamp, Paint color, String legend, BasicStroke stroke)` Draws a vertical rule into the graph and optionally adds a legend
    `void` | `vrule(long timestamp, Paint color, String legend, float width)` Draws a vertical rule into the graph and optionally adds a legend
    `void` | `vspan(long start, long end, Paint color)` Draws a vertical span into the graph.
    `void` | `vspan(long start, long end, Paint color, String legend)` Draws a vertical span into the graph and optionally adds a legend.

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Field Detail

    - #### altAutoscale

          boolean altAutoscale

    - #### altAutoscaleMax

          boolean altAutoscaleMax

    - #### altAutoscaleMin

          boolean altAutoscaleMin

    - #### altYGrid

          boolean altYGrid

    - #### altYMrtg

          boolean altYMrtg

    - #### antiAliasing

          boolean antiAliasing

    - #### backgroundImage

          RrdGraphDef.ImageSource backgroundImage

    - #### base

          double base

    - #### canvasImage

          RrdGraphDef.ImageSource canvasImage

    - #### comments

          final List<CommentText> comments

    - #### downsampler

          DownSampler downsampler

    - #### drawXGrid

          boolean drawXGrid

    - #### drawYGrid

          boolean drawYGrid

    - #### endTime

          long endTime

    - #### filename

          String filename

    - #### firstDayOfWeek

          int firstDayOfWeek

    - #### fonts

          Font[] fonts

    - #### forceRulesLegend

          boolean forceRulesLegend

    - #### formatProvider

          java.util.function.Function<TimeUnit,Optional<TimeLabelFormat>> formatProvider

    - #### gridStroke

          Stroke gridStroke

    - #### height

          int height

    - #### imageFormat

          String imageFormat

    - #### imageInfo

          String imageInfo

    - #### imageQuality

          float imageQuality

    - #### interlaced

          boolean interlaced

    - #### lazy

          boolean lazy

    - #### locale

          Locale locale

    - #### logarithmic

          boolean logarithmic

    - #### maxValue

          double maxValue

    - #### minValue

          double minValue

    - #### noLegend

          boolean noLegend

    - #### noMinorGrid

          boolean noMinorGrid

    - #### onlyGraph

          boolean onlyGraph

    - #### overlayImage

          RrdGraphDef.ImageSource overlayImage

    - #### plotElements

          final List<PlotElement> plotElements

    - #### poolUsed

          boolean poolUsed

    - #### rigid

          boolean rigid

    - #### showSignature

          boolean showSignature

    - #### signature

          String signature

    - #### sources

          final List<Source> sources

    - #### startTime

          long startTime

    - #### step

          long step

    - #### textAntiAliasing

          boolean textAntiAliasing

    - #### tickStroke

          Stroke tickStroke

    - #### timeAxisSetting

          TimeAxisSetting timeAxisSetting

    - #### timeLabelFormat

          TimeLabelFormat timeLabelFormat

    - #### title

          String title

    - #### tz

          TimeZone tz

    - #### unit

          String unit

    - #### unitsExponent

          int unitsExponent

    - #### unitsLength

          int unitsLength

    - #### valueAxisSetting

          ValueAxisSetting valueAxisSetting

    - #### verticalLabel

          String verticalLabel

    - #### width

          int width

  - ### Constructor Detail

    - #### RrdGraphDef

          public RrdGraphDef(long t1,
                             long t2)

      Creates RrdGraphDef object.

    - #### RrdGraphDef

          public RrdGraphDef(java.time.temporal.TemporalAmount d)

      Creates new DataProcessor object for the given time duration. The given duration will be substracted from current time.
      Parameters:
        `d` - duration to substract.

  - ### Method Detail

    - #### area

          public void area(double value,
                           Paint color,
                           boolean stack)

      Add a area like any other but with a constant value, it can be stacked like any other area
      Parameters:
        `value` - Area position
        `color` - Color of the filled area.
        `stack` - true if it will be stacked.

    - #### area

          public void area(String srcName,
                           Paint color)

      Plots requested data in the form of the filled area starting from zero, using the color specified.
      Parameters:
        `srcName` - Virtual source name.
        `color` - Color of the filled area.

    - #### area

          public void area(String srcName,
                           Paint color,
                           String legend)

      Plots requested data in the form of the filled area starting from zero, using the color specified.
      Parameters:
        `srcName` - Virtual source name.
        `color` - Color of the filled area.
        `legend` - Legend text.

    - #### area

          public void area(String srcName,
                           Paint color,
                           String legend,
                           boolean stack)

      Plots requested data in the form of the filled area starting from zero, using the color specified.
      Parameters:
        `srcName` - Virtual source name.
        `color` - Color of the filled area.
        `legend` - Legend text.
        `stack` - true if it will be stacked.

    - #### comment

          public void comment(String text)

      Comment to be printed on the graph.
      Parameters:
        `text` - Comment text

    - #### datasource

          public void datasource(String name,
                                 FetchData fetchData)

      Creates a new 'fetched' datasource. Datasource values are obtained from the given `FetchData` object.
      Specified by:
        `datasource` in interface `DataHolder`
      Parameters:
        `name` - Source name.
        `fetchData` - FetchData object.

    - #### datasource

          public void datasource(String name,
                                 IPlottable plottable)

      Creates a new (plottable) datasource. Datasource values are obtained from the given plottable object.
      Specified by:
        `datasource` in interface `DataHolder`
      Parameters:
        `name` - Source name.
        `plottable` - Plottable object.

    - #### datasource

          public void datasource(String name,
                                 String rpnExpression)

      Create a new virtual datasource by evaluating a mathematical expression, specified in Reverse Polish Notation (RPN).
      Specified by:
        `datasource` in interface `DataHolder`
      Parameters:
        `name` - Source name
        `rpnExpression` - RPN expression.

    - #### datasource

          public void datasource(String name,
                                 String dsName,
                                 FetchData fetchData)

      Creates a new 'fetched' datasource. Datasource values are obtained from the given `FetchData` object. Values will be extracted from the datasource dsName in the fetchData
      Specified by:
        `datasource` in interface `DataHolder`
      Parameters:
        `name` - Source name.
        `dsName` - Source name in fetchData.
        `fetchData` - FetchData object.

    - #### datasource

          public void datasource(String name,
                                 String rrdPath,
                                 String dsName,
                                 ConsolFun consolFun)

      Defines virtual datasource. This datasource can then be used in other methods like `datasource(String, String)` or `gprint(String, ConsolFun, String)`.
      Specified by:
        `datasource` in interface `DataHolder`
      Parameters:
        `name` - Source name
        `rrdPath` - Path to RRD file
        `dsName` - Datasource name in the specified RRD file
        `consolFun` - Consolidation function (AVERAGE, MIN, MAX, LAST)

    - #### datasource

          public void datasource(String name,
                                 String rrdPath,
                                 String dsName,
                                 ConsolFun consolFun,
                                 RrdBackendFactory backend)

      Defines virtual datasource. This datasource can then be used in other methods like `datasource(String, String)` or `gprint(String, ConsolFun, String)`.
      Specified by:
        `datasource` in interface `DataHolder`
      Parameters:
        `name` - Source name
        `rrdPath` - Path to RRD file
        `dsName` - Datasource name in the specified RRD file
        `consolFun` - Consolidation function (AVERAGE, MIN, MAX, LAST)
        `backend` - Backend to be used while fetching data from a RRD file.

    - #### datasource

          public void datasource(String name,
                                 String defName,
                                 Variable var)

      Creates a datasource that performs a variable calculation on an another named datasource to yield a single combined timestamp/value.

      Requires that the other datasource has already been defined; otherwise, it'll end up with no data

      Specified by:
        `datasource` in interface `DataHolder`
      Parameters:
        `name` - - the new virtual datasource name
        `defName` - - the datasource from which to extract the percentile. Must be a previously defined virtual datasource
        `var` - - a new instance of a Variable used to do the calculation

    - #### datasource

          public void datasource(String name,
                                 URI rrdUri,
                                 String dsName,
                                 ConsolFun consolFun)

      Defines virtual datasource. This datasource can then be used in other methods like `datasource(String, String)` or `gprint(String, ConsolFun, String)`.
      Specified by:
        `datasource` in interface `DataHolder`
      Parameters:
        `name` - Source name
        `rrdUri` - URI to RRD file
        `dsName` - Datasource name in the specified RRD file
        `consolFun` - Consolidation function (AVERAGE, MIN, MAX, LAST)

    - #### datasource

          public void datasource(String name,
                                 URI rrdUri,
                                 String dsName,
                                 ConsolFun consolFun,
                                 RrdBackendFactory backend)

      Defines virtual datasource. This datasource can then be used in other methods like `datasource(String, String)` or `gprint(String, ConsolFun, String)`.
      Specified by:
        `datasource` in interface `DataHolder`
      Parameters:
        `name` - Source name
        `rrdUri` - Path to RRD file
        `dsName` - Datasource name in the specified RRD file
        `consolFun` - Consolidation function (AVERAGE, MIN, MAX, LAST)
        `backend` - Backend to be used while fetching data from a RRD file.

    - #### drawTicks

          boolean drawTicks()

    - #### getColor

          Paint getColor(ElementsNames element)

    - #### getEndTime

          public long getEndTime()

      Description copied from interface: `DataHolder`
      Returns ending timestamp.
      Specified by:
        `getEndTime` in interface `DataHolder`
      Returns:
        Ending timestamp in seconds

    - #### getFont

          public Font getFont(RrdGraphConstants.FontTag tag)

    - #### getPool

          public RrdDbPool getPool()

      Specified by:
        `getPool` in interface `DataHolder`

    - #### getSignature

          public String getSignature()

      Gets the signature string that runs along the right-side of the graph.
      Returns:
        the signature string

    - #### getStartTime

          public long getStartTime()

      Description copied from interface: `DataHolder`
      Returns starting timestamp.
      Specified by:
        `getStartTime` in interface `DataHolder`
      Returns:
        Starting timestamp in seconds

    - #### getStep

          public long getStep()

      Description copied from interface: `DataHolder`
      Returns the time step used for timestamp interval.
      Specified by:
        `getStep` in interface `DataHolder`
      Returns:
        Step used for data processing.

    - #### getTimeZone

          public TimeZone getTimeZone()

      Specified by:
        `getTimeZone` in interface `DataHolder`

    - #### gprint

          public void gprint(String srcName,
                             String format)

      Read the value of a variable (VDEF) and prints the value by using the given format string. In the format string there should be a '%[l]f', '%[l]g' or '%[l]e' marker in the place where the number should be printed.

      If an additional '%s' is found AFTER the marker, the value will be scaled and an appropriate SI magnitude unit will be printed in place of the '%s' marker. The scaling will take the '--base' argument into consideration!

      If a '%S' is used instead of a '%s', then instead of calculating the appropriate SI magnitude unit for this value, the previously calculated SI magnitude unit will be used. This is useful if you want all the values in a print statement to have the same SI magnitude unit. If there was no previous SI magnitude calculation made, then '%S' behaves like a '%s', unless the value is 0, in which case it does not remember a SI magnitude unit and a SI magnitude unit will only be calculated when the next '%s' is seen or the next '%S' for a non-zero value. print results are added to the graph as a legend

      Parameters:
        `srcName` - Virtual source name
        `format` - Format string (like "average = %10.3f %s")

    - #### gprint

          public void gprint(String srcName,
                             String format,
                             boolean strftime)

      Read the value of a variable (VDEF) and prints the the value or the time stamp, according to the strftime flag by using the given format string. In and creates the result by using the given format string. In the format string there should be a '%[l]f', '%[l]g' or '%[l]e' marker in the place where the number should be printed.

      If an additional '%s' is found AFTER the marker, the value will be scaled and an appropriate SI magnitude unit will be printed in place of the '%s' marker. The scaling will take the '--base' argument into consideration!

      If a '%S' is used instead of a '%s', then instead of calculating the appropriate SI magnitude unit for this value, the previously calculated SI magnitude unit will be used. This is useful if you want all the values in a print statement to have the same SI magnitude unit. If there was no previous SI magnitude calculation made, then '%S' behaves like a '%s', unless the value is 0, in which case it does not remember a SI magnitude unit and a SI magnitude unit will only be calculated when the next '%s' is seen or the next '%S' for a non-zero value.

      print results are added to the graph as a legend.

      Parameters:
        `srcName` - Virtual source name
        `format` - Format string (like "average = %10.3f %s")
        `strftime` - use the timestamp from the variable (true) or the numerical value (false)

    - #### hrule

          public void hrule(double value,
                            Paint color)

      Draws a horizontal rule into the graph.
      Parameters:
        `value` - Position of the rule
        `color` - Rule color

    - #### hrule

          public void hrule(double value,
                            Paint color,
                            String legend)

      Draws a horizontal rule into the graph and optionally adds a legend.
      Parameters:
        `value` - Position of the rule
        `color` - Rule color
        `legend` - Legend text. If null, legend text will be omitted.

    - #### hrule

          public void hrule(double value,
                            Paint color,
                            String legend,
                            BasicStroke stroke)

      Draws a horizontal rule into the graph and optionally adds a legend.
      Parameters:
        `value` - Position of the rule
        `color` - Rule color
        `legend` - Legend text. If null, legend text will be omitted.
        `stroke` - Rule stroke

    - #### hrule

          public void hrule(double value,
                            Paint color,
                            String legend,
                            float width)

      Draws a horizontal rule into the graph and optionally adds a legend.
      Parameters:
        `value` - Position of the rule
        `color` - Rule color
        `legend` - Legend text. If null, legend text will be omitted.
        `width` - Rule width

    - #### hspan

          public void hspan(double start,
                            double end,
                            Paint color)

      Draws a horizontal span into the graph.
      Parameters:
        `start` - Starting value of the span
        `end` - Ending value of the span
        `color` - Rule color

    - #### hspan

          public void hspan(double start,
                            double end,
                            Paint color,
                            String legend)

      Draws a horizontal span into the graph and optionally adds a legend.
      Parameters:
        `start` - Starting value of the span
        `end` - Ending value of the span
        `color` - Rule color
        `legend` - Legend text. Use null to omit the text.

    - #### isPoolUsed

          public boolean isPoolUsed()

      Description copied from interface: `DataHolder`
      Returns boolean value representing `RrdDbPool` usage policy.
      Specified by:
        `isPoolUsed` in interface `DataHolder`
      Returns:
        true, if the pool will be used internally to fetch data from RRD files, false otherwise.

    - #### line

          public void line(double value,
                           Paint color,
                           BasicStroke stroke,
                           boolean stack)

      Define a line like any other but with constant value, it can be stacked
      Parameters:
        `value` - Line position.
        `color` - Line color.
        `stroke` - Line stroke to use.
        `stack` - true if it will be stacked.

    - #### line

          public void line(double value,
                           Paint color,
                           float width,
                           boolean stack)

      Define a line like any other but with constant value, it can be stacked
      Parameters:
        `value` - Line position.
        `color` - Line color.
        `width` - Line width (default: 1.0F).
        `stack` - true if it will be stacked.

    - #### line

          public void line(String srcName,
                           Paint color)

      Plots requested data as a line, using the color specified. Line width is assumed to be 1.0F.
      Parameters:
        `srcName` - Virtual source name
        `color` - Line color

    - #### line

          public void line(String srcName,
                           Paint color,
                           float width)

      Plots requested data as a line, using the color and the line width specified.
      Parameters:
        `srcName` - Virtual source name
        `color` - Line color
        `width` - Line width (default: 1.0F)

    - #### line

          public void line(String srcName,
                           Paint color,
                           String legend)

      Plots requested data as a line, using the color specified. Line width is assumed to be 1.0F.
      Parameters:
        `srcName` - Virtual source name
        `color` - Line color
        `legend` - Legend text

    - #### line

          public void line(String srcName,
                           Paint color,
                           String legend,
                           BasicStroke stroke,
                           boolean stack)

      Plots requested data as a line, using the color and the `BasicStroke` specified.
      Parameters:
        `srcName` - Virtual source name
        `color` - Line color.
        `legend` - Legend text.
        `stroke` - Line stroke to use.
        `stack` - true if it will be stacked.

    - #### line

          public void line(String srcName,
                           Paint color,
                           String legend,
                           float width)

      Plots requested data as a line, using the color and the line width specified.
      Parameters:
        `srcName` - Virtual source name
        `color` - Line color
        `legend` - Legend text
        `width` - Line width (default: 1.0F)

    - #### line

          public void line(String srcName,
                           Paint color,
                           String legend,
                           float width,
                           boolean stack)

      Plots requested data as a line, using the color and the line width specified.
      Parameters:
        `srcName` - Virtual source name
        `color` - Line color.
        `legend` - Legend text.
        `width` - Line width (default: 1.0F).
        `stack` - true if it will be stacked.

    - #### print

          public void print(String srcName,
                            String format)

      Read the value of a variable (VDEF) and prints the value by using the given format string. In the format string there should be a '%[l]f', '%[l]g' or '%[l]e' marker in the place where the number should be printed.

      If an additional '%s' is found AFTER the marker, the value will be scaled and an appropriate SI magnitude unit will be printed in place of the '%s' marker. The scaling will take the '--base' argument into consideration!

      If a '%S' is used instead of a '%s', then instead of calculating the appropriate SI magnitude unit for this value, the previously calculated SI magnitude unit will be used. This is useful if you want all the values in a print statement to have the same SI magnitude unit. If there was no previous SI magnitude calculation made, then '%S' behaves like a '%s', unless the value is 0, in which case it does not remember a SI magnitude unit and a SI magnitude unit will only be calculated when the next '%s' is seen or the next '%S' for a non-zero value.

      Print results are collected in the `RrdGraphInfo` object which is retrieved from the `object` once the graph is created.

      Parameters:
        `srcName` - Virtual source name
        `format` - Format string (like "average = %10.3f %s")

    - #### print

          public void print(String srcName,
                            String format,
                            boolean strftime)

      Read the value of a variable (VDEF) and prints the the value or the time stamp, according to the strftime flag by using the given format string. In and creates the result by using the given format string. In the format string there should be a '%[l]f', '%[l]g' or '%[l]e' marker in the place where the number should be printed.

      If an additional '%s' is found AFTER the marker, the value will be scaled and an appropriate SI magnitude unit will be printed in place of the '%s' marker. The scaling will take the '--base' argument into consideration!

      If a '%S' is used instead of a '%s', then instead of calculating the appropriate SI magnitude unit for this value, the previously calculated SI magnitude unit will be used. This is useful if you want all the values in a print statement to have the same SI magnitude unit. If there was no previous SI magnitude calculation made, then '%S' behaves like a '%s', unless the value is 0, in which case it does not remember a SI magnitude unit and a SI magnitude unit will only be calculated when the next '%s' is seen or the next '%S' for a non-zero value.

      Print results are collected in the `RrdGraphInfo` object which is retrieved from the `object` once the graph is created.

      Parameters:
        `srcName` - Virtual source name
        `format` - Format string (like "average = %10.3f %s")
        `strftime` - use the timestamp from the variable (true) or the numerical value (false)

    - #### printStatementCount

          int printStatementCount()

    - #### setAltAutoscale

          public void setAltAutoscale(boolean altAutoscale)

      Computes Y range based on function absolute minimum and maximum values. Default algorithm uses predefined set of ranges. This is good in many cases but it fails miserably when you need to graph something like 260 + 0.001 * sin(x). Default algorithm will use Y range from 250 to 300 and on the graph you will see almost straight line. With --alt-autoscale Y range will be from slightly less the 260 - 0.001 to slightly more then 260 + 0.001 and periodic behavior will be seen.
      Parameters:
        `altAutoscale` - true to request alternative autoscaling, false otherwise (default).

    - #### setAltAutoscaleMax

          public void setAltAutoscaleMax(boolean altAutoscaleMax)

      Computes Y range based on function absolute minimum and maximum values. Where setAltAutoscale(true) will modify both the absolute maximum AND minimum values, this option will only affect the maximum value. The minimum value, if not defined elsewhere, will be 0. This option can be useful when graphing router traffic when the WAN line uses compression, and thus the throughput may be higher than the WAN line speed.
      Parameters:
        `altAutoscaleMax` - true to request alternative autoscaling, false otherwise (default)

    - #### setAltAutoscaleMin

          public void setAltAutoscaleMin(boolean altAutoscaleMin)

      Computes Y range based on function absolute minimum and maximum values. Where setAltAutoscale(true) will modify both the absolute maximum AND minimum values, this option will only affect the maximum value. The minimum value, if not defined elsewhere, will be 0. This option can be useful when graphing router traffic when the WAN line uses compression, and thus the throughput may be higher than the WAN line speed.
      Parameters:
        `altAutoscaleMin` - true to request alternative autoscaling, false otherwise (default)

    - #### setAltYGrid

          public void setAltYGrid(boolean altYGrid)

      Places Y grid dynamically based on graph Y range. Algorithm ensures that you always have grid, that there are enough but not too many grid lines and the grid is metric. That is grid lines are placed every 1, 2, 5 or 10 units.
      Parameters:
        `altYGrid` - true, if Y grid should be calculated dynamically (defaults to false)

    - #### setAltYMrtg

          public void setAltYMrtg(boolean altYMrtg)

      Use this method to request MRTG-like graph (false by default)
      Parameters:
        `altYMrtg` - true, to create MRTG-like graph, false otherwise (default)

    - #### setAntiAliasing

          public void setAntiAliasing(boolean antiAliasing)

      Controls if the chart area of the image should be antialiased or not.
      Parameters:
        `antiAliasing` - use true to turn antialiasing on, false to turn it off (default)

    - #### setBackgroundImage

          public void setBackgroundImage(RrdGraphDef.ImageSource backgroundImage)

      Sets background image.
      Parameters:
        `backgroundImage` - An `RrdGraphDef.ImageSource` that will provides a `BufferedImage`

    - #### setBackgroundImage

          public void setBackgroundImage(String backgroundImage)

      Sets background image. ImageIO is used to download, so any supported format by ImageIO can be used, and it can be extended using ....
      Parameters:
        `backgroundImage` - Path to background image

    - #### setBackgroundImage

          public void setBackgroundImage(URL backgroundImageUrl)

      Sets background image. ImageIO is used to download, so any supported format by ImageIO can be used, and it can be extended using ....
      Parameters:
        `backgroundImageUrl` - URL to background image

    - #### setBase

          public void setBase(double base)

      Sets default base for magnitude scaling. If you are graphing memory (and NOT network traffic) this switch should be set to 1024 so that 1Kb is 1024 byte. For traffic measurement, 1 kb/s is 1000 b/s.
      Parameters:
        `base` - Base value (defaults to 1000.0)

    - #### setCanvasImage

          public void setCanvasImage(RrdGraphDef.ImageSource canvasImageSource)

      Sets canvas background image. Canvas image is printed on canvas area, under canvas color and plot.
      Parameters:
        `canvasImageSource` - An `RrdGraphDef.ImageSource` that will provides a `BufferedImage`

    - #### setCanvasImage

          public void setCanvasImage(String canvasImage)

      Sets canvas background image. Canvas image is printed on canvas area, under canvas color and plot. ImageIO is used to download, so any supported format by ImageIO can be used, and it can be extended using ....
      Parameters:
        `canvasImage` - Path to canvas image

    - #### setCanvasImage

          public void setCanvasImage(URL canvasUrl)

      Sets canvas background image. Canvas image is printed on canvas area, under canvas color and plot. ImageIO is used to download, so any supported format by ImageIO can be used, and it can be extended using ....
      Parameters:
        `canvasUrl` - URL to canvas image

    - #### setColor

          public void setColor(ElementsNames colorTag,
                               Paint color)

      Overrides the colors for the standard elements of the graph.
      Parameters:
        `colorTag` - The element to change color.
        `color` - The color of the element.

    - #### setColor

          public void setColor(int colorTag,
                               Paint color)

      Overrides the colors for the standard elements of the graph. The colorTag must be one of the following constants defined in the `RrdGraphConstants`: `COLOR_BACK`ground, `COLOR_CANVAS`, `COLOR_XAXIS`, `COLOR_SHADEA` left/top border, `COLOR_SHADEB` right/bottom border, `COLOR_GRID`, `COLOR_MGRID` major grid, `COLOR_FONT`, `COLOR_FRAME` and axis of the graph or `COLOR_ARROW`. This method can be called multiple times to set several colors.
      Parameters:
        `colorTag` - Color tag, as explained above.
        `color` - Any color (paint) you like

    - #### setDownsampler

          public void setDownsampler(DownSampler downsampler)

      Allows to set a downsampler, used to improved the visual representation of graph.

      More details can be found on Sveinn Steinarsson's thesis

      Parameters:
        `downsampler` - The downsampler that will be used

    - #### setDrawXGrid

          public void setDrawXGrid(boolean drawXGrid)

      Sets visibility of the X-axis grid.
      Parameters:
        `drawXGrid` - True if X-axis grid should be created (default), false otherwise.

    - #### setDrawYGrid

          public void setDrawYGrid(boolean drawYGrid)

      Sets visibility of the Y-axis grid.
      Parameters:
        `drawYGrid` - True if Y-axis grid should be created (default), false otherwise.

    - #### setEndTime

          public void setEndTime(long time)

      Sets the time when the graph should end. Time in seconds since epoch (1970-01-01) is required. Negative numbers are relative to the current time.
      Specified by:
        `setEndTime` in interface `DataHolder`
      Parameters:
        `time` - Ending time for the graph in seconds since epoch

    - #### setFilename

          public void setFilename(String filename)

      Sets the name of the graph to generate. Since Rrd4j outputs GIFs, PNGs, and JPEGs it's recommended that the filename end in either .gif, .png or .jpg. Rrd4j does not enforce this, however. If the filename is set to '-' the image will be created only in memory (no file will be created). PNG and GIF formats are recommended but JPEGs should be avoided.
      Parameters:
        `filename` - Path to the image file

    - #### setFirstDayOfWeek

          public void setFirstDayOfWeek(int firstDayOfWeek)

      Sets first day of the week.
      Parameters:
        `firstDayOfWeek` - One of the following constants: `MONDAY`, `TUESDAY`, `WEDNESDAY`, `THURSDAY`, `FRIDAY`, `SATURDAY`, `SUNDAY`

    - #### setFont

          public void setFont(RrdGraphConstants.FontTag fontTag,
                              Font font)

      Sets font to be used for a specific font tag. The fontTag must be one of the following constants defined in the `RrdGraphConstants`: `FONTTAG_DEFAULT` default font,, `FONTTAG_TITLE` title, `FONTTAG_AXIS` grid axis,, `FONTTAG_UNIT` vertical unit label,, `FONTTAG_LEGEND` legend, `FONTTAG_WATERMARK` watermark. This method can be called multiple times to set several fonts.
      Parameters:
        `fontTag` - Font tag, as explained above.
        `font` - Font to be used for tag

    - #### setFont

          public void setFont(RrdGraphConstants.FontTag fontTag,
                              Font font,
                              boolean setAll)

      Sets font.
      Parameters:
        `fontTag` - Font tag, as explained above.
        `font` - Font to be used for tag
        `setAll` - Boolean to flag whether to set all fonts if fontTag == FONTTAG_DEFAULT

    - #### setFont

          public void setFont(RrdGraphConstants.FontTag fontTag,
                              Font font,
                              boolean setAll,
                              boolean keepSizes)

      Sets font.
      Parameters:
        `fontTag` - Font tag, as explained above.
        `font` - Font to be used for tag
        `setAll` - Boolean to flag whether to set all fonts if fontTag == FONTTAG_DEFAULT
        `keepSizes` - Boolean to flag whether to keep original font sizes if setting all fonts.

    - #### setFont

          public void setFont(String fontTag,
                              Font font)

      Sets font.
      Parameters:
        `fontTag` - Font tag as String, as explained in `setFont(org.rrd4j.graph.RrdGraphConstants.FontTag, Font, boolean)`.
        `font` - Font to be used for tag

    - #### setFont

          public void setFont(String fontTag,
                              Font font,
                              boolean setAll)

      Sets font.
      Parameters:
        `fontTag` - Font tag as String, as explained in `setFont(org.rrd4j.graph.RrdGraphConstants.FontTag, Font, boolean)`.
        `font` - Font to be used for tag
        `setAll` - Boolean to flag whether to set all fonts if fontTag == FONTTAG_DEFAULT

    - #### setFont

          public void setFont(String fontTag,
                              Font font,
                              boolean setAll,
                              boolean keepSizes)

      Sets font.
      Parameters:
        `fontTag` - Font tag as String, as explained in `setFont(org.rrd4j.graph.RrdGraphConstants.FontTag, Font, boolean)`.
        `font` - Font to be used for tag
        `setAll` - Boolean to flag whether to set all fonts if fontTag == FONTTAG_DEFAULT
        `keepSizes` - Boolean to flag whether to keep original font sizes if setting all fonts.

    - #### setFontSet

          public void setFontSet(boolean rrdtool)

      This method reset the font set to it's default values. With the flag rrdtool set to true, it's not the old default set that is used, but the one taken from rrdtool. So use false to keep compatibility with previous version and true for a graph matching rrdtool's
      Parameters:
        `rrdtool` - true to use rrdtool font set

    - #### setForceRulesLegend

          public void setForceRulesLegend(boolean forceRulesLegend)

      Force the generation of HRULE and VRULE legend even if those HRULE or VRULE will not be drawn because out of graph boundaries.
      Parameters:
        `forceRulesLegend` - true if rule legend should be always printed, false otherwise (default).

    - #### setGridStroke

          public void setGridStroke(Stroke gridStroke)

      Set the Stroke used to draw grid
      Parameters:
        `gridStroke` - a `Stroke` object.

    - #### setHeight

          public void setHeight(int height)

      Sets height of the drawing area within the graph. This affects the total size of the image.
      Parameters:
        `height` - Height of the drawing area.

    - #### setImageFormat

          public void setImageFormat(String imageFormat)

      Sets image format. ImageIO is used to save the image, so any supported format by ImageIO can be used, and it can be extended using ....
      Parameters:
        `imageFormat` - Any value as return by `ImageIO.getReaderFormatNames()`

    - #### setImageInfo

          public void setImageInfo(String imageInfo)

      Creates additional image information. After the image has been created, the graph function uses imageInfo format string (printf-like) to create output similar to the `print(String, ConsolFun, String)` function. The format string is supplied with the following parameters: filename, xsize and ysize (in that particular order).

      For example, in order to generate an IMG tag suitable for including the graph into a web page, the command would look like this:

           setImageInfo("<IMG SRC='/img/%s' WIDTH='%d' HEIGHT='%d' ALT='Demo'>");

      Parameters:
        `imageInfo` - Image info format. Use %s placeholder for filename, %d placeholder for image width and height.

    - #### setImageQuality

          public void setImageQuality(float imageQuality)

      Sets image quality. Relevant only for JPEG images.
      Parameters:
        `imageQuality` - (0F=worst, 1F=best).

    - #### setInterlaced

          public void setInterlaced(boolean interlaced)

      Creates interlaced or progressive mode image.
      Parameters:
        `interlaced` - true, if GIF image should be interlaced.

    - #### setLazy

          public void setLazy(boolean lazy)

      Creates graph only if the current graph is out of date or not existent.
      Parameters:
        `lazy` - true, if graph should be 'lazy', false otherwise (default)

    - #### setLocale

          public void setLocale(Locale locale)

      Set the locale used for the legend.

      It overides the firstDayOfWeek

      Parameters:
        `locale` - the locale to set

    - #### setLogarithmic

          public void setLogarithmic(boolean logarithmic)

      Sets logarithmic y-axis scaling.
      Parameters:
        `logarithmic` - true, for logarithmic scaling, false otherwise (default).

    - #### setMaxValue

          public void setMaxValue(double maxValue)

      Defines the value normally located at the upper border of the graph. If the graph contains higher values, the upper border will move upwards to accommodate these values as well.

      If you want to define an upper-limit which will not move in any event you have to use `setRigid(boolean)` method as well.

      Parameters:
        `maxValue` - Maximal value displayed on the graph.

    - #### setMinValue

          public void setMinValue(double minValue)

      Sets the lower limit of a graph. But rather, this is the maximum lower bound of a graph. For example, the value -100 will result in a graph that has a lower limit of -100 or less. Use this method to expand graphs down.
      Parameters:
        `minValue` - Minimal value displayed on the graph

    - #### setNoLegend

          public void setNoLegend(boolean noLegend)

      Suppress generation of legend, only render the graph.
      Parameters:
        `noLegend` - true if graph legend should be omitted. False otherwise (default).

    - #### setNoMinorGrid

          public void setNoMinorGrid(boolean noMinorGrid)

      Use this method to turn off minor grid lines (printed by default)
      Parameters:
        `noMinorGrid` - true, to turn off, false to turn on (default)

    - #### setOnlyGraph

          public void setOnlyGraph(boolean onlyGraph)

      Suppresses anything but the graph, works only for height < 64.
      Parameters:
        `onlyGraph` - true if only graph should be created, false otherwise (default).

    - #### setOverlayImage

          public void setOverlayImage(RrdGraphDef.ImageSource overlayImageSource)

      Sets overlay image. Overlay image is printed on the top of the image, once it is completely created.
      Parameters:
        `overlayImageSource` - An `RrdGraphDef.ImageSource` that will provides a `BufferedImage`

    - #### setOverlayImage

          public void setOverlayImage(String overlayImage)

      Sets overlay image. Overlay image is printed on the top of the image, once it is completely created. ImageIO is used to download, so any supported format by ImageIO can be used, and it can be extended using ....
      Parameters:
        `overlayImage` - Path to overlay image

    - #### setOverlayImage

          public void setOverlayImage(URL overlayImage)

      Sets overlay image. Overlay image is printed on the top of the image, once it is completely created. ImageIO is used to download, so any supported format by ImageIO can be used, and it can be extended using ....
      Parameters:
        `overlayImage` - URL to overlay image

    - #### setPool

          public void setPool(RrdDbPool pool)

      Description copied from interface: `DataHolder`
      Defines the `RrdDbPool` to use. If not defined, but {`DataHolder.setPoolUsed(boolean)` set to true, the default `RrdDbPool.getInstance()` will be used.
      Specified by:
        `setPool` in interface `DataHolder`
      Parameters:
        `pool` - an optional pool to use.

    - #### setPoolUsed

          public void setPoolUsed(boolean poolUsed)

      Sets RrdDbPool usage policy (defaults to true). If set to true, `RrdDbPool` will be used to access individual RRD files. If set to false, RRD files will be accessed directly.
      Specified by:
        `setPoolUsed` in interface `DataHolder`
      Parameters:
        `poolUsed` - true, if RrdDbPool class should be used. False otherwise.

    - #### setRigid

          public void setRigid(boolean rigid)

      Sets rigid boundaries mode. Normally Rrd4j will automatically expand the lower and upper limit if the graph contains a value outside the valid range. With the `true` argument you can disable this behavior.
      Parameters:
        `rigid` - true if upper and lower limits should not be expanded to accommodate values outside of the specified range. False otherwise (default).

    - #### setShowSignature

          public void setShowSignature(boolean showSignature)

      Shows or hides graph signature (gator) in the top right corner of the graph
      Parameters:
        `showSignature` - true, if signature should be seen (default), false otherwise

    - #### setSignature

          public void setSignature(String signature)

      Sets the signature string that runs along the right-side of the graph. Defaults to "Generated by RRD4J".
      Parameters:
        `signature` - the string to print

    - #### setStartTime

          public void setStartTime(long time)

      Sets the time when the graph should begin. Time in seconds since epoch (1970-01-01) is required. Negative numbers are relative to the current time.
      Specified by:
        `setStartTime` in interface `DataHolder`
      Parameters:
        `time` - Starting time for the graph in seconds since epoch

    - #### setStep

          public void setStep(long step)

      Suggests which time step should be used by Rrd4j while processing data from RRD files.
      Specified by:
        `setStep` in interface `DataHolder`
      Parameters:
        `step` - Desired time step (don't use this method if you don't know what you're doing).

    - #### setTextAntiAliasing

          public void setTextAntiAliasing(boolean textAntiAliasing)

      Controls if the text should be antialiased or not.
      Parameters:
        `textAntiAliasing` - use true to turn text-antialiasing on, false to turn it off (default)

    - #### setTickStroke

          public void setTickStroke(Stroke tickStroke)

      Set the stroke used to draw ticks
      Parameters:
        `tickStroke` - a `Stroke` object.

    - #### setTimeAxis

          public void setTimeAxis(int minorUnit,
                                  int minorUnitCount,
                                  int majorUnit,
                                  int majorUnitCount,
                                  int labelUnit,
                                  int labelUnitCount,
                                  int labelSpan,
                                  String simpleDateFormat)

      Configures x-axis grid and labels. The x-axis label is quite complex to configure. So if you don't have very special needs, you can rely on the autoconfiguration to get this right.

      Otherwise, you have to configure three elements making up the x-axis labels and grid. The base grid, the major grid and the labels. The configuration is based on the idea that you first specify a well known amount of time and then say how many times it has to pass between each minor/major grid line or label. For the label you have to define two additional items: The precision of the label in seconds and the format used to generate the text of the label.

      For example, if you wanted a graph with a base grid every 10 minutes and a major one every hour, with labels every hour you would use the following x-axis definition.

           setTimeAxis(RrdGraphConstants.MINUTE, 10,
                       RrdGraphConstants.HOUR, 1,
                       RrdGraphConstants.HOUR, 1,
                       0, "%H:%M")

      The precision in this example is 0 because the %X format is exact. If the label was the name of the day, we would have had a precision of 24 hours, because when you say something like 'Monday' you mean the whole day and not Monday morning 00:00. Thus the label should be positioned at noon. By defining a precision of 24 hours or rather 86400 seconds, you make sure that this happens.

      Parameters:
        `minorUnit` - Minor grid unit. Minor grid, major grid and label units can be one of the following constants defined in `RrdGraphConstants`: `SECOND`, `MINUTE`, `HOUR`, `DAY`, `WEEK`, `MONTH`, `YEAR`.
        `minorUnitCount` - Number of minor grid units between minor grid lines.
        `majorUnit` - Major grid unit.
        `majorUnitCount` - Number of major grid units between major grid lines.
        `labelUnit` - Label unit.
        `labelUnitCount` - Number of label units between labels.
        `labelSpan` - Label precision
        `simpleDateFormat` - Date format (SimpleDateFormat pattern of strftime-like pattern)

    - #### setTimeAxis

          public void setTimeAxis(int minorUnit,
                                  int minorUnitCount,
                                  int majorUnit,
                                  int majorUnitCount,
                                  int labelUnit,
                                  int labelUnitCount,
                                  int labelSpan,
                                  TimeLabelFormat format)

      It configure the x-axis grid in the same way than `setTimeAxis(int, int, int, int, int, int, int, String)`, but it allows to use a `TimeLabelFormat` to format the date label.
      Parameters:
        `minorUnit` -
        `minorUnitCount` -
        `majorUnit` -
        `majorUnitCount` -
        `labelUnit` -
        `labelUnitCount` -
        `labelSpan` -
        `format` -

    - #### setTimeLabelFormat

          public void setTimeLabelFormat(TimeLabelFormat format)

      This allows to keep the default major and minor grid unit, but with changing only the label formatting, using a `TimeLabelFormat`
      Parameters:
        `format` - a custom dynamic time label format

    - #### setTimeLabelFormatter

          public void setTimeLabelFormatter(java.util.function.Function<TimeUnit,Optional<TimeLabelFormat>> formatProvider)

      This allows to keep the default major and minor grid unit, but with changing only the label formatting, that will be formatted differently according to `TimeUnit` chosen for the time axis.

      If the returned `Optional` is empty, the default formatting will be kept

      Default formatting
      `TimeUnit` | Default pattern
      --- | ---
      MINUTE | HH:mm
      HOUR | HH:mm
      DAY | EEE dd
      WEEK | 'Week 'w
      MONTH | MMM
      YEAR | yy

      Parameters:
        `formatProvider` - An `Optional` holding the `TimeLabelFormat` to use or empy to keep the default.

    - #### setTimeSpan

          public void setTimeSpan(long[] timestamps)

      Sets starting and ending time for the for the graph. Timestamps in seconds since epoch are required.
      Parameters:
        `timestamps` - Array of timestamps. The first array item will be chosen for the starting timestamp. The last array item will be chosen for the ending timestamp.

    - #### setTimeSpan

          public void setTimeSpan(long startTime,
                                  long endTime)

      Sets starting and ending time for the for the graph. Timestamps in seconds since epoch are required. Negative numbers are relative to the current time.
      Specified by:
        `setTimeSpan` in interface `DataHolder`
      Parameters:
        `startTime` - Starting time in seconds since epoch
        `endTime` - Ending time in seconds since epoch

    - #### setTimeZone

          public void setTimeZone(TimeZone tz)

      Set the time zone used for the legend.
      Specified by:
        `setTimeZone` in interface `DataHolder`
      Parameters:
        `tz` - the time zone to set

    - #### setTitle

          public void setTitle(String title)

      Defines a title to be written into the graph.
      Parameters:
        `title` - Graph title.

    - #### setUnit

          public void setUnit(String unit)

      Sets unit to be displayed on y axis. It is wise to use only short units on graph, however.
      Parameters:
        `unit` - Unit description

    - #### setUnitsExponent

          public void setUnitsExponent(int unitsExponent)

      Sets the 10**unitsExponent scaling of the y-axis values. Normally values will be scaled to the appropriate units (k, M, etc.). However you may wish to display units always in k (Kilo, 10e3) even if the data is in the M (Mega, 10e6) range for instance. Value should be an integer which is a multiple of 3 between -18 and 18, inclusive. It is the exponent on the units you which to use. For example, use 3 to display the y-axis values in k (Kilo, 10e3, thousands), use -6 to display the y-axis values in µ (Micro, 10e-6, millionths). Use a value of 0 to prevent any scaling of the y-axis values.
      Parameters:
        `unitsExponent` - the 10**unitsExponent value for scaling y-axis values.

    - #### setUnitsLength

          public void setUnitsLength(int unitsLength)

      Sets the character width on the left side of the graph for y-axis values.
      Parameters:
        `unitsLength` - Number of characters on the left side of the graphs reserved for vertical axis labels.

    - #### setValueAxis

          public void setValueAxis(double gridStep,
                                   int labelFactor)

      Sets vertical axis grid and labels. Makes vertical grid lines appear at gridStep interval. Every labelFactor*gridStep, a major grid line is printed, along with label showing the value of the grid line.
      Parameters:
        `gridStep` - Minor grid step
        `labelFactor` - Specifies how many minor minor grid steps will appear between labels (major grid lines)

    - #### setVerticalLabel

          public void setVerticalLabel(String verticalLabel)

      Sets vertical label on the left side of the graph. This is normally used to specify the units used.
      Parameters:
        `verticalLabel` - Vertical axis label

    - #### setWidth

          public void setWidth(int width)

      Sets width of the drawing area within the graph. This affects the total size of the image.
      Parameters:
        `width` - Width of the drawing area.

    - #### shouldPlot

          boolean shouldPlot()

    - #### stack

          public void stack(String srcName,
                            Paint color)

      Does the same as `line(String, java.awt.Paint)`, but the graph gets stacked on top of the previous LINE, AREA or STACK graph. Depending on the type of the previous graph, the STACK will be either a LINE or an AREA. This obviously implies that the first STACK must be preceded by an AREA or LINE.

      Note, that when you STACK onto *UNKNOWN* data, Rrd4j will not draw any graphics ... *UNKNOWN* is not zero.

      Parameters:
        `srcName` - Virtual source name
        `color` - Stacked graph color
      Throws:
        `IllegalArgumentException` - Thrown if this STACK has no previously defined AREA, STACK or LINE graph bellow it.

    - #### stack

          public void stack(String srcName,
                            Paint color,
                            String legend)

      Does the same as `line(String, java.awt.Paint, String)`, but the graph gets stacked on top of the previous LINE, AREA or STACK graph. Depending on the type of the previous graph, the STACK will be either a LINE or an AREA. This obviously implies that the first STACK must be preceded by an AREA or LINE. Note, that when you STACK onto *UNKNOWN* data, Rrd4j will not draw any graphics ... *UNKNOWN* is not zero.
      Parameters:
        `srcName` - Virtual source name
        `color` - Stacked graph color
        `legend` - Legend text
      Throws:
        `IllegalArgumentException` - Thrown if this STACK has no previously defined AREA, STACK or LINE graph bellow it.

    - #### vrule

          public void vrule(long timestamp,
                            Paint color)

      Draws a vertical rule into the graph.
      Parameters:
        `timestamp` - Position of the rule (seconds since epoch)
        `color` - Rule color

    - #### vrule

          public void vrule(long timestamp,
                            Paint color,
                            String legend)

      Draws a vertical rule into the graph and optionally adds a legend
      Parameters:
        `timestamp` - Position of the rule (seconds since epoch)
        `color` - Rule color
        `legend` - Legend text. Use null to omit the text.

    - #### vrule

          public void vrule(long timestamp,
                            Paint color,
                            String legend,
                            BasicStroke stroke)

      Draws a vertical rule into the graph and optionally adds a legend
      Parameters:
        `timestamp` - Position of the rule (seconds since epoch)
        `color` - Rule color
        `legend` - Legend text. Use null to omit the text.
        `stroke` - Rule stroke

    - #### vrule

          public void vrule(long timestamp,
                            Paint color,
                            String legend,
                            float width)

      Draws a vertical rule into the graph and optionally adds a legend
      Parameters:
        `timestamp` - Position of the rule (seconds since epoch)
        `color` - Rule color
        `legend` - Legend text. Use null to omit the text.
        `width` - Rule width

    - #### vspan

          public void vspan(long start,
                            long end,
                            Paint color)

      Draws a vertical span into the graph.
      Parameters:
        `start` - Start time for the span (seconds since epoch)
        `end` - End time for the span (seconds since epoch)
        `color` - Rule color

    - #### vspan

          public void vspan(long start,
                            long end,
                            Paint color,
                            String legend)

      Draws a vertical span into the graph and optionally adds a legend.
      Parameters:
        `start` - Start time for the span (seconds since epoch)
        `end` - End time for the span (seconds since epoch)
        `color` - Rule color
        `legend` - Legend text. Use null to omit the text.