java.lang.Object
net.i2p.router.web.GraphRenderer.GraphRenderConfig
Enclosing class:
GraphRenderer

static final class GraphRenderer.GraphRenderConfigextends Object
Immutable configuration for a single graph render pass. Built by GraphRenderer.buildRenderConfig(int, int, boolean, boolean, boolean, boolean, int, int, boolean, List, String, boolean) and consumed by the various configure* methods.
  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Class
    Description
    (package private) static final class 
    Mutable counterpart of GraphRenderer.GraphRenderConfig; every setter returns itself.
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    (package private) final boolean
    Draw the primary series as a line rather than a filled area.
    (package private) int
    1000 or 1024, the divisor the stat's value format scales by.
    (package private) double
    Largest finite value in the plotted window, NaN until resolved.
    (package private) double
    Smallest finite value in the plotted window, NaN until resolved.
    (package private) String
    Title derived from the rate stat name.
    (package private) String
    Legend description of the primary series.
    (package private) String
    Unused; the extra series take their legend description from their own listeners.
    (package private) String[]
    The primary listener's datasource ids: index 0 is the stat, 1 the event count.
    (package private) String[]
    Unused; the extra series read their datasource ids from their own listeners.
    (package private) final long
    Window end, in wall-clock ms: now, less the render offset and any endp.
    (package private) final List<GraphListener>
    Extra series of a combined graph, in legend order; empty for a single-stat graph.
    (package private) final boolean
    Render every series as a translucent filled path under a thin line.
    (package private) final boolean
    True to keep the historical zero-floored y-axis (GraphRenderer.PROP_ZERO_BASE).
    (package private) final int
    Frame height in pixels, which a value gradient spans.
    (package private) final boolean
    True to omit the grid lines.
    (package private) final boolean
    True to omit the legend, and with it the summary block and the restart markers.
    (package private) final boolean
    True to omit the title derived from the stat name.
    (package private) final String
    Active UI language code, which selects the fonts and the translated title.
    (package private) Font
    Font for the legend rows.
    (package private) SimpleDateFormat
    Date format for the legend and signature lines, UTC-aware when useUtc is set.
    (package private) int
    Unused; each series takes its stroke width from the theme at draw time.
    (package private) final GraphListener
    The listener holding the RRD: the datasource, the archive rows and the clock.
    (package private) final boolean
    Emit the plot geometry and series as JSON instead of drawing.
    (package private) boolean
    True to format values with no decimals, for counts and percentages.
    (package private) String
    RRD4j format string the legend's min/max/avg/now figures are printed with.
    (package private) String
    Path of the primary listener's RRD file.
    (package private) String
    Unused; the extra series take their RRD path from their own listeners.
    (package private) final long
    The rate's period in ms, which is also the archive step.
    (package private) final int
    Periods in the window, already clamped to the number the archive holds.
    (package private) String
    Datasource id plotted as the primary series.
    (package private) String
    Unused; the extra series of a combined graph are configured from extras.
    (package private) final Rate
    The tracked rate, for its period, stat name and description.
    (package private) Color
    Theme colour of the restart rules.
    (package private) final boolean
    True to keep rrd4j's signature line.
    (package private) final boolean
    True to plot the event count instead of the stat itself.
    (package private) final boolean
    True to rule off each router restart inside the window.
    (package private) boolean
    True to format values with one decimal; two when both decimal flags are false.
    (package private) Font
    Font for the axis ticks and the unit text.
    (package private) final boolean
    True to interpolate between samples instead of stepping.
    (package private) final long
    Window start, in wall-clock ms.
    (package private) final String
    Console theme name every colour, font and width is read from.
    (package private) String
    Date suffix for the legend/signature; " UTC" when rendering in UTC.
    (package private) Font
    Font for the title.
    (package private) final String
    Title to draw, or null to derive one from the stat name.
    (package private) final boolean
    True to label the axis and the dates in UTC.
    (package private) final int
    Frame width in pixels, which the downsampling budget is derived from.
  • Method Summary

    All Methods
    Modifier and Type
    Method
    Description
    Starts the configuration for one render pass.

    Methods inherited from class Object

    clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • start

      final long start
      Window start, in wall-clock ms.
    • end

      final long end
      Window end, in wall-clock ms: now, less the render offset and any endp.
    • period

      final long period
      The rate's period in ms, which is also the archive step.
    • width

      final int width
      Frame width in pixels, which the downsampling budget is derived from.
    • height

      final int height
      Frame height in pixels, which a value gradient spans.
    • periodCount

      final int periodCount
      Periods in the window, already clamped to the number the archive holds.
    • theme

      final String theme
      Console theme name every colour, font and width is read from.
    • hideLegend

      final boolean hideLegend
      True to omit the legend, and with it the summary block and the restart markers.
    • hideGrid

      final boolean hideGrid
      True to omit the grid lines.
    • hideTitle

      final boolean hideTitle
      True to omit the title derived from the stat name.
    • showEvents

      final boolean showEvents
      True to plot the event count instead of the stat itself.
    • showCredit

      final boolean showCredit
      True to keep rrd4j's signature line.
    • showRestarts

      final boolean showRestarts
      True to rule off each router restart inside the window.
    • titleOverride

      final String titleOverride
      Title to draw, or null to derive one from the stat name.
    • rate

      final Rate rate
      The tracked rate, for its period, stat name and description.
    • extras

      final List<GraphListener> extras
      Extra series of a combined graph, in legend order; empty for a single-stat graph.
    • allLines

      final boolean allLines
      Draw the primary series as a line rather than a filled area. Set for combined graphs: a filled primary hides whichever series crosses it, so every member of a group is drawn the same way.
    • fillSeries

      final boolean fillSeries
      Render every series as a translucent filled path under a thin line. @since 0.9.71+.
    • useUtc

      final boolean useUtc
      True to label the axis and the dates in UTC.
    • smooth

      final boolean smooth
      True to interpolate between samples instead of stepping.
    • forceZero

      final boolean forceZero
      True to keep the historical zero-floored y-axis (GraphRenderer.PROP_ZERO_BASE).
    • meta

      final boolean meta
      Emit the plot geometry and series as JSON instead of drawing. @since 0.9.71+.
    • lang

      final String lang
      Active UI language code, which selects the fonts and the translated title.
    • listener

      final GraphListener listener
      The listener holding the RRD: the datasource, the archive rows and the clock.
    • derivedTitle

      String derivedTitle
      Title derived from the rate stat name.
    • noDecimalPlace

      boolean noDecimalPlace
      True to format values with no decimals, for counts and percentages.
    • singleDecimalPlace

      boolean singleDecimalPlace
      True to format values with one decimal; two when both decimal flags are false.
    • base

      int base
      1000 or 1024, the divisor the stat's value format scales by.
    • small

      Font small
      Font for the axis ticks and the unit text.
    • legend

      Font legend
      Font for the legend rows.
    • title

      Font title
      Font for the title.
    • numberFormat

      String numberFormat
      RRD4j format string the legend's min/max/avg/now figures are printed with.
    • restartColor

      Color restartColor
      Theme colour of the restart rules.
    • legendSdf

      SimpleDateFormat legendSdf
      Date format for the legend and signature lines, UTC-aware when useUtc is set.
    • timeLabel

      String timeLabel
      Date suffix for the legend/signature; " UTC" when rendering in UTC. Derived from useUtc here so every path prints a consistent label, never a literal "null".
    • plotName

      String plotName
      Datasource id plotted as the primary series.
    • descr

      String descr
      Legend description of the primary series.
    • path

      String path
      Path of the primary listener's RRD file.
    • dsNames

      String[] dsNames
      The primary listener's datasource ids: index 0 is the stat, 1 the event count.
    • plotName2

      String plotName2
      Unused; the extra series of a combined graph are configured from extras.
    • descr2

      String descr2
      Unused; the extra series take their legend description from their own listeners.
    • path2

      String path2
      Unused; the extra series take their RRD path from their own listeners.
    • dsNames2

      String[] dsNames2
      Unused; the extra series read their datasource ids from their own listeners.
    • linewidth

      int linewidth
      Unused; each series takes its stroke width from the theme at draw time.
    • dataMin

      double dataMin
      Smallest finite value in the plotted window, NaN until resolved.
    • dataMax

      double dataMax
      Largest finite value in the plotted window, NaN until resolved.
  • Method Details