Skip to content

VisualizationBuilder🔗

Constructor🔗

new VisualizationBuilder()

Methods🔗

build🔗

Builds the object.

build()

actions🔗

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

@param array<\Grafana\Foundation\Cog\Builder<\Grafana\Foundation\Dashboardv2beta1\Action>> $actions

actions(array $actions)

calculate🔗

Controls if the heatmap should be calculated from data

calculate(bool $calculate)

calculation🔗

Calculation options for the heatmap

@param \Grafana\Foundation\Cog\Builder<\Grafana\Foundation\Common\HeatmapCalculationOptions> $calculation

calculation(\Grafana\Foundation\Cog\Builder $calculation)

cellGap🔗

Controls gap between cells

cellGap(int $cellGap)

cellRadius🔗

Controls cell radius

cellRadius(float $cellRadius)

cellValues🔗

Controls cell value unit

@param \Grafana\Foundation\Cog\Builder<\Grafana\Foundation\Heatmap\CellValues> $cellValues

cellValues(\Grafana\Foundation\Cog\Builder $cellValues)

color🔗

Controls the color options

@param \Grafana\Foundation\Cog\Builder<\Grafana\Foundation\Heatmap\HeatmapColorOptions> $color

color(\Grafana\Foundation\Cog\Builder $color)

colorScheme🔗

Panel color configuration

@param \Grafana\Foundation\Cog\Builder<\Grafana\Foundation\Dashboardv2beta1\FieldColor> $color

colorScheme(\Grafana\Foundation\Cog\Builder $color)

The behavior when clicking on a result

@param array $links

dataLinks(array $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.

decimals(float $decimals)

description🔗

Human readable field metadata

description(string $description)

displayName🔗

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

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.

displayNameFromDS(string $displayNameFromDS)

exemplars🔗

Controls exemplar options

@param \Grafana\Foundation\Cog\Builder<\Grafana\Foundation\Heatmap\ExemplarConfig> $exemplars

exemplars(\Grafana\Foundation\Cog\Builder $exemplars)

fieldMinMax🔗

Calculate min max per field

fieldMinMax(bool $fieldMinMax)

filterValues🔗

Filters values between a given range

@param \Grafana\Foundation\Cog\Builder<\Grafana\Foundation\Heatmap\FilterValueRange> $filterValues

filterValues(\Grafana\Foundation\Cog\Builder $filterValues)

hideFrom🔗

@param \Grafana\Foundation\Cog\Builder<\Grafana\Foundation\Common\HideSeriesConfig> $hideFrom

hideFrom(\Grafana\Foundation\Cog\Builder $hideFrom)

legend🔗

| *{

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

}

Controls legend options

@param \Grafana\Foundation\Cog\Builder<\Grafana\Foundation\Heatmap\HeatmapLegend> $legend

legend(\Grafana\Foundation\Cog\Builder $legend)

mappings🔗

Convert input values into a display string

@param array<\Grafana\Foundation\Dashboardv2beta1\ValueMap|\Grafana\Foundation\Dashboardv2beta1\RangeMap|\Grafana\Foundation\Dashboardv2beta1\RegexMap|\Grafana\Foundation\Dashboardv2beta1\SpecialValueMap> $mappings

mappings(array $mappings)

max🔗

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

max(float $max)

min🔗

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

min(float $min)

noValue🔗

Alternative to empty string

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

nullValueMode(\Grafana\Foundation\Dashboardv2beta1\NullValueMode $nullValueMode)

override🔗

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

@param \Grafana\Foundation\Cog\Builder<\Grafana\Foundation\Dashboardv2beta1\Dashboardv2beta1FieldConfigSourceOverrides> $override

override(\Grafana\Foundation\Cog\Builder $override)

overrideByFieldType🔗

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

@param array<\Grafana\Foundation\Dashboardv2beta1\DynamicConfigValue> $properties

overrideByFieldType(string $fieldType, array $properties)

overrideByName🔗

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

@param array<\Grafana\Foundation\Dashboardv2beta1\DynamicConfigValue> $properties

overrideByName(string $name, array $properties)

overrideByQuery🔗

@param array<\Grafana\Foundation\Dashboardv2beta1\DynamicConfigValue> $properties

overrideByQuery(string $queryRefId, array $properties)

overrideByRegexp🔗

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

@param array<\Grafana\Foundation\Dashboardv2beta1\DynamicConfigValue> $properties

overrideByRegexp(string $regexp, array $properties)

overrides🔗

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

@param array<\Grafana\Foundation\Cog\Builder<\Grafana\Foundation\Dashboardv2beta1\Dashboardv2beta1FieldConfigSourceOverrides>> $overrides

overrides(array $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

path(string $path)

rowsFrame🔗

Controls tick alignment and value name when not calculating from data

@param \Grafana\Foundation\Cog\Builder<\Grafana\Foundation\Heatmap\RowsHeatmapOptions> $rowsFrame

rowsFrame(\Grafana\Foundation\Cog\Builder $rowsFrame)

scaleDistribution🔗

@param \Grafana\Foundation\Cog\Builder<\Grafana\Foundation\Common\ScaleDistributionConfig> $scaleDistribution

scaleDistribution(\Grafana\Foundation\Cog\Builder $scaleDistribution)

selectionMode🔗

Controls which axis to allow selection on

selectionMode(\Grafana\Foundation\Heatmap\HeatmapSelectionMode $selectionMode)

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

showValue(\Grafana\Foundation\Common\VisibilityMode $showValue)

thresholds🔗

Map numeric values to states

@param \Grafana\Foundation\Cog\Builder<\Grafana\Foundation\Dashboardv2beta1\ThresholdsConfig> $thresholds

thresholds(\Grafana\Foundation\Cog\Builder $thresholds)

tooltip🔗

Controls tooltip options

@param \Grafana\Foundation\Cog\Builder<\Grafana\Foundation\Heatmap\HeatmapTooltip> $tooltip

tooltip(\Grafana\Foundation\Cog\Builder $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.

unit(string $unit)

yAxis🔗

Controls yAxis placement

@param \Grafana\Foundation\Cog\Builder<\Grafana\Foundation\Heatmap\YAxisConfig> $yAxis

yAxis(\Grafana\Foundation\Cog\Builder $yAxis)

See also🔗