Skip to content

PanelBuilderπŸ”—

ConstructorπŸ”—

new PanelBuilder()

MethodsπŸ”—

buildπŸ”—

Builds the object.

public Panel build()

cacheTimeoutπŸ”—

Sets panel queries cache timeout.

public PanelBuilder cacheTimeout(String cacheTimeout)

calculateπŸ”—

Controls if the heatmap should be calculated from data

public PanelBuilder calculate(Boolean calculate)

calculationπŸ”—

Calculation options for the heatmap

public PanelBuilder calculation(com.grafana.foundation.cog.Builder<HeatmapCalculationOptions> calculation)

cellGapπŸ”—

Controls gap between cells

public PanelBuilder cellGap(Integer cellGap)

cellRadiusπŸ”—

Controls cell radius

public PanelBuilder cellRadius(Float cellRadius)

cellValuesπŸ”—

Controls cell value unit

public PanelBuilder cellValues(com.grafana.foundation.cog.Builder<CellValues> cellValues)

colorπŸ”—

Controls the color options

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

colorSchemeπŸ”—

Panel color configuration

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

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)

exemplarsColorπŸ”—

Controls exemplar options

public PanelBuilder exemplarsColor(String color)

filterValuesπŸ”—

Filters values between a given range

public PanelBuilder filterValues(com.grafana.foundation.cog.Builder<FilterValueRange> filterValues)

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)

hideLegendπŸ”—

| *{

axisPlacement: ui.AxisPlacement & "left" // TODO: fix after remove when https://github.com/grafana/cuetsy/issues/74 is fixed

}

Controls legend options

public PanelBuilder hideLegend()

hideTimeOverrideπŸ”—

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

public PanelBuilder hideTimeOverride(Boolean hideTimeOverride)

hideYHistogramπŸ”—

Controls if the tooltip shows a histogram of the y-axis values

public PanelBuilder hideYHistogram()

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)

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)

libraryPanelπŸ”—

Dynamically load the panel

public PanelBuilder libraryPanel(LibraryPanelRef libraryPanel)

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)

maxHeightπŸ”—

public PanelBuilder maxHeight(Double maxHeight)

maxPerRowπŸ”—

Option for repeated panels that controls max items per row

Only relevant for horizontally repeated panels

public PanelBuilder maxPerRow(Double maxPerRow)

maxWidthπŸ”—

public PanelBuilder maxWidth(Double maxWidth)

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πŸ”—

Controls how the tooltip is shown

public PanelBuilder mode(TooltipDisplayMode 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)

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)

rowsFrameπŸ”—

Controls tick alignment and value name when not calculating from data

public PanelBuilder rowsFrame(com.grafana.foundation.cog.Builder<RowsHeatmapOptions> rowsFrame)

scaleDistributionπŸ”—

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

selectionModeπŸ”—

Controls which axis to allow selection on

public PanelBuilder selectionMode(HeatmapSelectionMode selectionMode)

showColorScaleπŸ”—

Controls if the tooltip shows a color scale in header

public PanelBuilder showColorScale(Boolean showColorScale)

showLegendπŸ”—

| *{

axisPlacement: ui.AxisPlacement & "left" // TODO: fix after remove when https://github.com/grafana/cuetsy/issues/74 is fixed

}

Controls legend options

public PanelBuilder showLegend()

showValueπŸ”—

| *{

layout: ui.HeatmapCellLayout & "auto" // TODO: fix after remove when https://github.com/grafana/cuetsy/issues/74 is fixed

}

Controls the display of the value in the cell

public PanelBuilder showValue(VisibilityMode showValue)

showYHistogramπŸ”—

Controls if the tooltip shows a histogram of the y-axis values

public PanelBuilder showYHistogram()

spanπŸ”—

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

public PanelBuilder span(Integer w)

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)

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)

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)

yAxisπŸ”—

Controls yAxis placement

public PanelBuilder yAxis(com.grafana.foundation.cog.Builder<YAxisConfig> yAxis)

See alsoπŸ”—