Skip to content

VisualizationBuilder🔗

Constructor🔗

new VisualizationBuilder()

Methods🔗

build🔗

Builds the object.

public Visualization build()

actions🔗

Define interactive HTTP requests that can be triggered from data visualizations.

public VisualizationBuilder actions(List<com.grafana.foundation.cog.Builder<Action>> actions)

axisBorderShow🔗

public VisualizationBuilder axisBorderShow(Boolean axisBorderShow)

axisCenteredZero🔗

public VisualizationBuilder axisCenteredZero(Boolean axisCenteredZero)

axisColorMode🔗

public VisualizationBuilder axisColorMode(AxisColorMode axisColorMode)

axisGridShow🔗

public VisualizationBuilder axisGridShow(Boolean axisGridShow)

axisLabel🔗

public VisualizationBuilder axisLabel(String axisLabel)

axisPlacement🔗

public VisualizationBuilder axisPlacement(AxisPlacement axisPlacement)

axisSoftMax🔗

public VisualizationBuilder axisSoftMax(Double axisSoftMax)

axisSoftMin🔗

public VisualizationBuilder axisSoftMin(Double axisSoftMin)

axisWidth🔗

public VisualizationBuilder axisWidth(Double axisWidth)

barRadius🔗

Controls the radius of each bar.

public VisualizationBuilder barRadius(Double barRadius)

barWidth🔗

Controls the width of bars. 1 = Max width, 0 = Min width.

public VisualizationBuilder barWidth(Double barWidth)

colorByField🔗

Use the color value for a sibling field to color each bar value.

public VisualizationBuilder colorByField(String colorByField)

colorScheme🔗

Panel color configuration

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

The behavior when clicking on a result

public VisualizationBuilder dataLinks(List<Object> links)

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 VisualizationBuilder decimals(Double decimals)

description🔗

Human readable field metadata

public VisualizationBuilder description(String description)

displayName🔗

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

public VisualizationBuilder displayName(String displayName)

displayNameFromDS🔗

This can be used by data sources that return and explicit naming structure for values and labels

When this property is configured, this value is used rather than the default naming strategy.

public VisualizationBuilder displayNameFromDS(String displayNameFromDS)

fieldMinMax🔗

Calculate min max per field

public VisualizationBuilder fieldMinMax(Boolean fieldMinMax)

fillOpacity🔗

Controls the fill opacity of the bars.

public VisualizationBuilder fillOpacity(Integer fillOpacity)

fullHighlight🔗

Enables mode which highlights the entire bar area and shows tooltip when cursor

hovers over highlighted area

public VisualizationBuilder fullHighlight(Boolean fullHighlight)

gradientMode🔗

Set the mode of the gradient fill. Fill gradient is based on the line color. To change the color, use the standard color scheme field option.

Gradient appearance is influenced by the Fill opacity setting.

public VisualizationBuilder gradientMode(GraphGradientMode gradientMode)

groupWidth🔗

Controls the width of groups. 1 = max with, 0 = min width.

public VisualizationBuilder groupWidth(Double groupWidth)

hideFrom🔗

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

legend🔗

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

lineWidth🔗

Controls line width of the bars.

public VisualizationBuilder lineWidth(Integer lineWidth)

mappings🔗

Convert input values into a display string

public VisualizationBuilder 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 VisualizationBuilder max(Double max)

min🔗

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

public VisualizationBuilder min(Double min)

noValue🔗

Alternative to empty string

public VisualizationBuilder noValue(String noValue)

nullValueMode🔗

How null values should be handled when calculating field stats

"null" - Include null values, "connected" - Ignore nulls, "null as zero" - Treat nulls as zero

public VisualizationBuilder nullValueMode(NullValueMode nullValueMode)

orientation🔗

Controls the orientation of the bar chart, either vertical or horizontal.

public VisualizationBuilder orientation(VizOrientation orientation)

override🔗

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

public VisualizationBuilder override(String systemRef, MatcherConfig matcher, List<DynamicConfigValue> properties)

overrideByFieldType🔗

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

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

overrideByName🔗

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

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

overrideByQuery🔗

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

overrideByRegexp🔗

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

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

overrides🔗

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

public VisualizationBuilder overrides(List<com.grafana.foundation.cog.Builder<Dashboardv2beta1FieldConfigSourceOverrides>> overrides)

path🔗

An explicit path to the field in the datasource. When the frame meta includes a path,

This will default to `${frame.meta.path}/${field.name}

When defined, this value can be used as an identifier within the datasource scope, and

may be used to update the results

public VisualizationBuilder path(String path)

scaleDistribution🔗

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

showValue🔗

This controls whether values are shown on top or to the left of bars.

public VisualizationBuilder showValue(VisibilityMode showValue)

stacking🔗

Controls whether bars are stacked or not, either normally or in percent mode.

public VisualizationBuilder stacking(StackingMode stacking)

text🔗

public VisualizationBuilder text(com.grafana.foundation.cog.Builder<VizTextDisplayOptions> text)

thresholds🔗

Map numeric values to states

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

thresholdsStyle🔗

Threshold rendering

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

tooltip🔗

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

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 VisualizationBuilder unit(String unit)

xField🔗

Manually select which field from the dataset to represent the x field.

public VisualizationBuilder xField(String xField)

xTickLabelMaxLength🔗

Sets the max length that a label can have before it is truncated.

public VisualizationBuilder xTickLabelMaxLength(Integer xTickLabelMaxLength)

xTickLabelRotation🔗

Controls the rotation of the x axis labels.

public VisualizationBuilder xTickLabelRotation(Integer xTickLabelRotation)

xTickLabelSpacing🔗

Controls the spacing between x axis labels.

negative values indicate backwards skipping behavior

public VisualizationBuilder xTickLabelSpacing(Integer xTickLabelSpacing)

See also🔗