net.i2p.router.web

## Class GraphRenderer

- java.lang.Object
- - net.i2p.router.web.GraphRenderer

-     class GraphRenderer
      extends Object

  Generate the RRD graph png images, including the combined rate graph.

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `(package private) String` | `DEFAULT_FONT_NAME`
    `(package private) String` | `DEFAULT_LEGEND_FONT_NAME`
    `(package private) String` | `DEFAULT_TITLE_FONT_NAME`
    `(package private) GraphicsEnvironment` | `e`
    `(package private) List<String>` | `fontlist`
    `(package private) String[]` | `sysfonts`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `GraphRenderer(I2PAppContext ctx, GraphListener lsnr)`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `render(OutputStream out)`
    `void` | `render(OutputStream out, int width, int height, boolean hideLegend, boolean hideGrid, boolean hideTitle, boolean showEvents, int periodCount, int endp, boolean showCredit)` Single graph.
    `void` | `render(OutputStream out, int width, int height, boolean hideLegend, boolean hideGrid, boolean hideTitle, boolean showEvents, int periodCount, int endp, boolean showCredit, GraphListener lsnr2, String titleOverride)` Single or two-data-source graph.

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

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

- - ### Field Detail

    - #### DEFAULT_FONT_NAME

          String DEFAULT_FONT_NAME

    - #### DEFAULT_LEGEND_FONT_NAME

          String DEFAULT_LEGEND_FONT_NAME

    - #### DEFAULT_TITLE_FONT_NAME

          String DEFAULT_TITLE_FONT_NAME

    - #### e

          GraphicsEnvironment e

    - #### fontlist

          List<String> fontlist

    - #### sysfonts

          String[] sysfonts

  - ### Constructor Detail

    - #### GraphRenderer

          public GraphRenderer(I2PAppContext ctx,
                               GraphListener lsnr)

  - ### Method Detail

    - #### render

          public void render(OutputStream out)
                      throws IOException

      Throws:
        `IOException`

    - #### render

          public void render(OutputStream out,
                             int width,
                             int height,
                             boolean hideLegend,
                             boolean hideGrid,
                             boolean hideTitle,
                             boolean showEvents,
                             int periodCount,
                             int endp,
                             boolean showCredit)
                      throws IOException

      Single graph.
      Parameters:
        `endp` - number of periods before now
      Throws:
        `IOException`

    - #### render

          public void render(OutputStream out,
                             int width,
                             int height,
                             boolean hideLegend,
                             boolean hideGrid,
                             boolean hideTitle,
                             boolean showEvents,
                             int periodCount,
                             int endp,
                             boolean showCredit,
                             GraphListener lsnr2,
                             String titleOverride)
                      throws IOException

      Single or two-data-source graph.
      Parameters:
        `lsnr2` - 2nd data source to plot on same graph, or null. Not recommended for events.
        `titleOverride` - If non-null, overrides the title
      Throws:
        `IOException`