java.lang.Object
net.i2p.router.web.GraphRenderer.GraphRenderConfig
- Enclosing class:
GraphRenderer
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 ClassesModifier and TypeClassDescription(package private) static final classMutable counterpart ofGraphRenderer.GraphRenderConfig; every setter returns itself.Field Summary
FieldsModifier and TypeFieldDescription(package private) final booleanDraw the primary series as a line rather than a filled area.(package private) int1000 or 1024, the divisor the stat's value format scales by.(package private) doubleLargest finite value in the plotted window, NaN until resolved.(package private) doubleSmallest finite value in the plotted window, NaN until resolved.(package private) StringTitle derived from the rate stat name.(package private) StringLegend description of the primary series.(package private) StringUnused; 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 longWindow 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 booleanRender every series as a translucent filled path under a thin line.(package private) final booleanTrue to keep the historical zero-floored y-axis (GraphRenderer.PROP_ZERO_BASE).(package private) final intFrame height in pixels, which a value gradient spans.(package private) final booleanTrue to omit the grid lines.(package private) final booleanTrue to omit the legend, and with it the summary block and the restart markers.(package private) final booleanTrue to omit the title derived from the stat name.(package private) final StringActive UI language code, which selects the fonts and the translated title.(package private) FontFont for the legend rows.(package private) SimpleDateFormatDate format for the legend and signature lines, UTC-aware when useUtc is set.(package private) intUnused; each series takes its stroke width from the theme at draw time.(package private) final GraphListenerThe listener holding the RRD: the datasource, the archive rows and the clock.(package private) final booleanEmit the plot geometry and series as JSON instead of drawing.(package private) booleanTrue to format values with no decimals, for counts and percentages.(package private) StringRRD4j format string the legend's min/max/avg/now figures are printed with.(package private) StringPath of the primary listener's RRD file.(package private) StringUnused; the extra series take their RRD path from their own listeners.(package private) final longThe rate's period in ms, which is also the archive step.(package private) final intPeriods in the window, already clamped to the number the archive holds.(package private) StringDatasource id plotted as the primary series.(package private) StringUnused; the extra series of a combined graph are configured fromextras.(package private) final RateThe tracked rate, for its period, stat name and description.(package private) ColorTheme colour of the restart rules.(package private) final booleanTrue to keep rrd4j's signature line.(package private) final booleanTrue to plot the event count instead of the stat itself.(package private) final booleanTrue to rule off each router restart inside the window.(package private) booleanTrue to format values with one decimal; two when both decimal flags are false.(package private) FontFont for the axis ticks and the unit text.(package private) final booleanTrue to interpolate between samples instead of stepping.(package private) final longWindow start, in wall-clock ms.(package private) final StringConsole theme name every colour, font and width is read from.(package private) StringDate suffix for the legend/signature; " UTC" when rendering in UTC.(package private) FontFont for the title.(package private) final StringTitle to draw, or null to derive one from the stat name.(package private) final booleanTrue to label the axis and the dates in UTC.(package private) final intFrame width in pixels, which the downsampling budget is derived from.Method Summary
All MethodsModifier and TypeMethodDescription(package private) static GraphRenderer.GraphRenderConfig.Builderbuilder()Starts the configuration for one render pass.
Field Details
start
final long startWindow start, in wall-clock ms.end
final long endWindow end, in wall-clock ms: now, less the render offset and any endp.period
final long periodThe rate's period in ms, which is also the archive step.width
final int widthFrame width in pixels, which the downsampling budget is derived from.height
final int heightFrame height in pixels, which a value gradient spans.periodCount
final int periodCountPeriods in the window, already clamped to the number the archive holds.theme
Console theme name every colour, font and width is read from.hideLegend
final boolean hideLegendTrue to omit the legend, and with it the summary block and the restart markers.hideGrid
final boolean hideGridTrue to omit the grid lines.hideTitle
final boolean hideTitleTrue to omit the title derived from the stat name.showEvents
final boolean showEventsTrue to plot the event count instead of the stat itself.showCredit
final boolean showCreditTrue to keep rrd4j's signature line.showRestarts
final boolean showRestartsTrue to rule off each router restart inside the window.titleOverride
Title to draw, or null to derive one from the stat name.rate
The tracked rate, for its period, stat name and description.extras
Extra series of a combined graph, in legend order; empty for a single-stat graph.allLines
final boolean allLinesDraw 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 fillSeriesRender every series as a translucent filled path under a thin line. @since 0.9.71+.useUtc
final boolean useUtcTrue to label the axis and the dates in UTC.smooth
final boolean smoothTrue to interpolate between samples instead of stepping.forceZero
final boolean forceZeroTrue to keep the historical zero-floored y-axis (GraphRenderer.PROP_ZERO_BASE).meta
final boolean metaEmit the plot geometry and series as JSON instead of drawing. @since 0.9.71+.lang
Active UI language code, which selects the fonts and the translated title.listener
The listener holding the RRD: the datasource, the archive rows and the clock.derivedTitle
String derivedTitleTitle derived from the rate stat name.noDecimalPlace
boolean noDecimalPlaceTrue to format values with no decimals, for counts and percentages.singleDecimalPlace
boolean singleDecimalPlaceTrue to format values with one decimal; two when both decimal flags are false.base
int base1000 or 1024, the divisor the stat's value format scales by.small
Font smallFont for the axis ticks and the unit text.legend
Font legendFont for the legend rows.title
Font titleFont for the title.numberFormat
String numberFormatRRD4j format string the legend's min/max/avg/now figures are printed with.restartColor
Color restartColorTheme colour of the restart rules.legendSdf
SimpleDateFormat legendSdfDate format for the legend and signature lines, UTC-aware when useUtc is set.timeLabel
String timeLabelDate 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 plotNameDatasource id plotted as the primary series.descr
String descrLegend description of the primary series.path
String pathPath of the primary listener's RRD file.dsNames
String[] dsNamesThe primary listener's datasource ids: index 0 is the stat, 1 the event count.plotName2
descr2
String descr2Unused; the extra series take their legend description from their own listeners.path2
String path2Unused; the extra series take their RRD path from their own listeners.dsNames2
String[] dsNames2Unused; the extra series read their datasource ids from their own listeners.linewidth
int linewidthUnused; each series takes its stroke width from the theme at draw time.dataMin
double dataMinSmallest finite value in the plotted window, NaN until resolved.dataMax
double dataMaxLargest finite value in the plotted window, NaN until resolved.
Method Details
builder
Starts the configuration for one render pass.- Returns:
- an empty builder