Skip to content

PanelBuilderπŸ”—

ConstructorπŸ”—

new PanelBuilder()

MethodsπŸ”—

buildπŸ”—

Builds the object.

public Panel build()

axisBorderShowπŸ”—

public PanelBuilder axisBorderShow(Boolean axisBorderShow)

axisCenteredZeroπŸ”—

public PanelBuilder axisCenteredZero(Boolean axisCenteredZero)

axisColorModeπŸ”—

public PanelBuilder axisColorMode(AxisColorMode axisColorMode)

axisGridShowπŸ”—

public PanelBuilder axisGridShow(Boolean axisGridShow)

axisLabelπŸ”—

public PanelBuilder axisLabel(String axisLabel)

axisPlacementπŸ”—

public PanelBuilder axisPlacement(AxisPlacement axisPlacement)

axisSoftMaxπŸ”—

public PanelBuilder axisSoftMax(Double axisSoftMax)

axisSoftMinπŸ”—

public PanelBuilder axisSoftMin(Double axisSoftMin)

axisWidthπŸ”—

public PanelBuilder axisWidth(Double axisWidth)

barAlignmentπŸ”—

public PanelBuilder barAlignment(BarAlignment barAlignment)

barMaxWidthπŸ”—

public PanelBuilder barMaxWidth(Double barMaxWidth)

barWidthFactorπŸ”—

public PanelBuilder barWidthFactor(Double barWidthFactor)

cacheTimeoutπŸ”—

Sets panel queries cache timeout.

public PanelBuilder cacheTimeout(String cacheTimeout)

candleStyleπŸ”—

Sets the style of the candlesticks

public PanelBuilder candleStyle(CandleStyle candleStyle)

colorSchemeπŸ”—

Panel color configuration

public PanelBuilder colorScheme(com.grafana.foundation.cog.Builder<FieldColor> color)

colorStrategyπŸ”—

Sets the color strategy for the candlesticks

public PanelBuilder colorStrategy(ColorStrategy colorStrategy)

colorsπŸ”—

Set which colors are used when the price movement is up or down

public PanelBuilder colors(com.grafana.foundation.cog.Builder<CandlestickColors> colors)

The behavior when clicking on a result

public PanelBuilder dataLinks(List<com.grafana.foundation.cog.Builder<DashboardLink>> links)

datasourceπŸ”—

The datasource used in all targets.

public PanelBuilder datasource(DataSourceRef datasource)

decimalsπŸ”—

Specify the number of decimals Grafana includes in the rendered value.

If you leave this field blank, Grafana automatically truncates the number of decimals based on the value.

For example 1.1234 will display as 1.12 and 100.456 will display as 100.

To display all decimals, set the unit to String.

public PanelBuilder decimals(Double decimals)

descriptionπŸ”—

Panel description.

public PanelBuilder description(String description)

displayNameπŸ”—

The display value for this field. This supports template variables blank is auto

public PanelBuilder displayName(String displayName)

drawStyleπŸ”—

public PanelBuilder drawStyle(GraphDrawStyle drawStyle)

fieldsπŸ”—

Map fields to appropriate dimension

public PanelBuilder fields(com.grafana.foundation.cog.Builder<CandlestickFieldMap> fields)

fillBelowToπŸ”—

public PanelBuilder fillBelowTo(String fillBelowTo)

fillColorπŸ”—

public PanelBuilder fillColor(String fillColor)

fillOpacityπŸ”—

public PanelBuilder fillOpacity(Double fillOpacity)

gradientModeπŸ”—

public PanelBuilder gradientMode(GraphGradientMode gradientMode)

gridPosπŸ”—

Grid position.

public PanelBuilder gridPos(GridPos gridPos)

heightπŸ”—

Panel height. The height is the number of rows from the top edge of the panel.

public PanelBuilder height(Integer h)

hideFromπŸ”—

public PanelBuilder hideFrom(com.grafana.foundation.cog.Builder<HideSeriesConfig> hideFrom)

hideTimeOverrideπŸ”—

Controls if the timeFrom or timeShift overrides are shown in the panel header

public PanelBuilder hideTimeOverride(Boolean hideTimeOverride)

idπŸ”—

Unique identifier of the panel. Generated by Grafana when creating a new panel. It must be unique within a dashboard, but not globally.

public PanelBuilder id(Integer id)

includeAllFieldsπŸ”—

When enabled, all fields will be sent to the graph

public PanelBuilder includeAllFields(Boolean includeAllFields)

insertNullsπŸ”—

public PanelBuilder insertNulls(BoolOrFloat64 insertNulls)

intervalπŸ”—

The min time interval setting defines a lower limit for the $__interval and $__interval_ms variables.

This value must be formatted as a number followed by a valid time

identifier like: "40s", "3d", etc.

See: https://grafana.com/docs/grafana/latest/panels-visualizations/query-transform-data/#query-options

public PanelBuilder interval(String interval)

legendπŸ”—

public PanelBuilder legend(com.grafana.foundation.cog.Builder<VizLegendOptions> legend)

libraryPanelπŸ”—

Dynamically load the panel

public PanelBuilder libraryPanel(LibraryPanelRef libraryPanel)

lineColorπŸ”—

public PanelBuilder lineColor(String lineColor)

lineInterpolationπŸ”—

public PanelBuilder lineInterpolation(LineInterpolation lineInterpolation)

lineStyleπŸ”—

public PanelBuilder lineStyle(com.grafana.foundation.cog.Builder<LineStyle> lineStyle)

lineWidthπŸ”—

public PanelBuilder lineWidth(Double lineWidth)

Panel links.

public PanelBuilder links(List<com.grafana.foundation.cog.Builder<DashboardLink>> links)

mappingsπŸ”—

Convert input values into a display string

public PanelBuilder mappings(List<ValueMapping> mappings)

maxπŸ”—

The maximum value used in percentage threshold calculations. Leave blank for auto calculation based on all series and fields.

public PanelBuilder max(Double max)

maxDataPointsπŸ”—

The maximum number of data points that the panel queries are retrieving.

public PanelBuilder maxDataPoints(Double maxDataPoints)

maxPerRowπŸ”—

Option for repeated panels that controls max items per row

Only relevant for horizontally repeated panels

public PanelBuilder maxPerRow(Double maxPerRow)

minπŸ”—

The minimum value used in percentage threshold calculations. Leave blank for auto calculation based on all series and fields.

public PanelBuilder min(Double min)

modeπŸ”—

Sets which dimensions are used for the visualization

public PanelBuilder mode(VizDisplayMode mode)

noValueπŸ”—

Alternative to empty string

public PanelBuilder noValue(String noValue)

overrideByFieldTypeπŸ”—

Adds override rules for all the fields of the given type.

public PanelBuilder overrideByFieldType(String fieldType, List<DynamicConfigValue> properties)

overrideByNameπŸ”—

Adds override rules for a specific field, referred to by its name.

public PanelBuilder overrideByName(String name, List<DynamicConfigValue> properties)

overrideByQueryπŸ”—

public PanelBuilder overrideByQuery(String queryRefId, List<DynamicConfigValue> properties)

overrideByRegexpπŸ”—

Adds override rules for the fields whose name match the given regexp.

public PanelBuilder overrideByRegexp(String regexp, List<DynamicConfigValue> properties)

overridesπŸ”—

Overrides are the options applied to specific fields overriding the defaults.

public PanelBuilder overrides(List<com.grafana.foundation.cog.Builder<DashboardFieldConfigSourceOverrides>> overrides)

pointColorπŸ”—

public PanelBuilder pointColor(String pointColor)

pointSizeπŸ”—

public PanelBuilder pointSize(Double pointSize)

pointSymbolπŸ”—

public PanelBuilder pointSymbol(String pointSymbol)

queryCachingTTLπŸ”—

Overrides the data source configured time-to-live for a query cache item in milliseconds

public PanelBuilder queryCachingTTL(Double queryCachingTTL)

repeatπŸ”—

Name of template variable to repeat for.

public PanelBuilder repeat(String repeat)

repeatDirectionπŸ”—

Direction to repeat in if 'repeat' is set.

h for horizontal, v for vertical.

public PanelBuilder repeatDirection(PanelRepeatDirection repeatDirection)

scaleDistributionπŸ”—

public PanelBuilder scaleDistribution(com.grafana.foundation.cog.Builder<ScaleDistributionConfig> scaleDistribution)

showPointsπŸ”—

public PanelBuilder showPoints(VisibilityMode showPoints)

spanπŸ”—

Panel width. The width is the number of columns from the left edge of the panel.

public PanelBuilder span(Integer w)

spanNullsπŸ”—

Indicate if null values should be treated as gaps or connected.

When the value is a number, it represents the maximum delta in the

X axis that should be considered connected. For timeseries, this is milliseconds

public PanelBuilder spanNulls(BoolOrFloat64 spanNulls)

stackingπŸ”—

public PanelBuilder stacking(com.grafana.foundation.cog.Builder<StackingConfig> stacking)

targetsπŸ”—

Depends on the panel plugin. See the plugin documentation for details.

public PanelBuilder targets(List<com.grafana.foundation.cog.Builder<Dataquery>> targets)

thresholdsπŸ”—

Map numeric values to states

public PanelBuilder thresholds(com.grafana.foundation.cog.Builder<ThresholdsConfig> thresholds)

thresholdsStyleπŸ”—

public PanelBuilder thresholdsStyle(com.grafana.foundation.cog.Builder<GraphThresholdsStyleConfig> thresholdsStyle)

timeFromπŸ”—

Overrides the relative time range for individual panels,

which causes them to be different than what is selected in

the dashboard time picker in the top-right corner of the dashboard. You can use this to show metrics from different

time periods or days on the same dashboard.

The value is formatted as time operation like: now-5m (Last 5 minutes), now/d (the day so far),

now-5d/d(Last 5 days), now/w (This week so far), now-2y/y (Last 2 years).

Note: Panel time overrides have no effect when the dashboard’s time range is absolute.

See: https://grafana.com/docs/grafana/latest/panels-visualizations/query-transform-data/#query-options

public PanelBuilder timeFrom(String timeFrom)

timeShiftπŸ”—

Overrides the time range for individual panels by shifting its start and end relative to the time picker.

For example, you can shift the time range for the panel to be two hours earlier than the dashboard time picker setting 2h.

Note: Panel time overrides have no effect when the dashboard’s time range is absolute.

See: https://grafana.com/docs/grafana/latest/panels-visualizations/query-transform-data/#query-options

public PanelBuilder timeShift(String timeShift)

titleπŸ”—

Panel title.

public PanelBuilder title(String title)

tooltipπŸ”—

public PanelBuilder tooltip(com.grafana.foundation.cog.Builder<VizTooltipOptions> tooltip)

transformπŸ”—

public PanelBuilder transform(GraphTransform transform)

transformationsπŸ”—

List of transformations that are applied to the panel data before rendering.

When there are multiple transformations, Grafana applies them in the order they are listed.

Each transformation creates a result set that then passes on to the next transformation in the processing pipeline.

public PanelBuilder transformations(List<DataTransformerConfig> transformations)

transparentπŸ”—

Whether to display the panel without a background.

public PanelBuilder transparent(Boolean transparent)

unitπŸ”—

Unit a field should use. The unit you select is applied to all fields except time.

You can use the units ID availables in Grafana or a custom unit.

Available units in Grafana: https://github.com/grafana/grafana/blob/main/packages/grafana-data/src/valueFormats/categories.ts

As custom unit, you can use the following formats:

suffix:<suffix> for custom unit that should go after value.

prefix:<prefix> for custom unit that should go before value.

time:<format> For custom date time formats type for example time:YYYY-MM-DD.

si:<base scale><unit characters> for custom SI units. For example: si: mF. This one is a bit more advanced as you can specify both a unit and the source data scale. So if your source data is represented as milli (thousands of) something prefix the unit with that SI scale character.

count:<unit> for a custom count unit.

currency:<unit> for custom a currency unit.

public PanelBuilder unit(String unit)

withOverrideπŸ”—

Overrides are the options applied to specific fields overriding the defaults.

public PanelBuilder withOverride(com.grafana.foundation.cog.Builder<DashboardFieldConfigSourceOverrides> override)

withTargetπŸ”—

Depends on the panel plugin. See the plugin documentation for details.

public PanelBuilder withTarget(com.grafana.foundation.cog.Builder<Dataquery> target)

withTransformationπŸ”—

List of transformations that are applied to the panel data before rendering.

When there are multiple transformations, Grafana applies them in the order they are listed.

Each transformation creates a result set that then passes on to the next transformation in the processing pipeline.

public PanelBuilder withTransformation(DataTransformerConfig transformation)

See alsoπŸ”—