Skip to content

PanelBuilderπŸ”—

ConstructorπŸ”—

new PanelBuilder()

MethodsπŸ”—

buildπŸ”—

Builds the object.

build()

cacheTimeoutπŸ”—

Sets panel queries cache timeout.

cacheTimeout(cacheTimeout: string)

calculateπŸ”—

Controls if the heatmap should be calculated from data

calculate(calculate: boolean)

calculationπŸ”—

Calculation options for the heatmap

calculation(calculation: cog.Builder<common.HeatmapCalculationOptions>)

cellGapπŸ”—

Controls gap between cells

cellGap(cellGap: number)

cellRadiusπŸ”—

Controls cell radius

cellRadius(cellRadius: number)

cellValuesπŸ”—

Controls cell value unit

cellValues(cellValues: cog.Builder<heatmap.CellValues>)

colorπŸ”—

Controls the color options

color(color: cog.Builder<heatmap.HeatmapColorOptions>)

colorSchemeπŸ”—

Panel color configuration

colorScheme(color: cog.Builder<dashboard.FieldColor>)

The behavior when clicking on a result

dataLinks(links: cog.Builder<dashboard.DashboardLink>[])

datasourceπŸ”—

The datasource used in all targets.

datasource(datasource: dashboard.DataSourceRef)

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(decimals: number)

descriptionπŸ”—

Panel description.

description(description: string)

displayNameπŸ”—

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

displayName(displayName: string)

exemplarsColorπŸ”—

Controls exemplar options

exemplarsColor(color: string)

filterValuesπŸ”—

Filters values between a given range

filterValues(filterValues: cog.Builder<heatmap.FilterValueRange>)

gridPosπŸ”—

Grid position.

gridPos(gridPos: dashboard.GridPos)

heightπŸ”—

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

height(h: number)

hideFromπŸ”—

hideFrom(hideFrom: cog.Builder<common.HideSeriesConfig>)

hideLegendπŸ”—

| *{

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

}

Controls legend options

hideLegend()

hideTimeOverrideπŸ”—

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

hideTimeOverride(hideTimeOverride: boolean)

hideYHistogramπŸ”—

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

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.

id(id: number)

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

interval(interval: string)

libraryPanelπŸ”—

Dynamically load the panel

libraryPanel(libraryPanel: dashboard.LibraryPanelRef)

Panel links.

links(links: cog.Builder<dashboard.DashboardLink>[])

mappingsπŸ”—

Convert input values into a display string

mappings(mappings: dashboard.ValueMapping[])

maxπŸ”—

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

max(max: number)

maxDataPointsπŸ”—

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

maxDataPoints(maxDataPoints: number)

maxHeightπŸ”—

maxHeight(maxHeight: number)

maxPerRowπŸ”—

Option for repeated panels that controls max items per row

Only relevant for horizontally repeated panels

maxPerRow(maxPerRow: number)

maxWidthπŸ”—

maxWidth(maxWidth: number)

minπŸ”—

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

min(min: number)

modeπŸ”—

Controls how the tooltip is shown

mode(mode: common.TooltipDisplayMode)

noValueπŸ”—

Alternative to empty string

noValue(noValue: string)

overridesπŸ”—

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

overrides(overrides: {
    matcher: dashboard.MatcherConfig;
    properties: dashboard.DynamicConfigValue[];
}[])

queryCachingTTLπŸ”—

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

queryCachingTTL(queryCachingTTL: number)

repeatπŸ”—

Name of template variable to repeat for.

repeat(repeat: string)

repeatDirectionπŸ”—

Direction to repeat in if 'repeat' is set.

h for horizontal, v for vertical.

repeatDirection(repeatDirection: "h" | "v")

rowsFrameπŸ”—

Controls tick alignment and value name when not calculating from data

rowsFrame(rowsFrame: cog.Builder<heatmap.RowsHeatmapOptions>)

scaleDistributionπŸ”—

scaleDistribution(scaleDistribution: cog.Builder<common.ScaleDistributionConfig>)

selectionModeπŸ”—

Controls which axis to allow selection on

selectionMode(selectionMode: heatmap.HeatmapSelectionMode)

showColorScaleπŸ”—

Controls if the tooltip shows a color scale in header

showColorScale(showColorScale: boolean)

showLegendπŸ”—

| *{

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

}

Controls legend options

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

showValue(showValue: common.VisibilityMode)

showYHistogramπŸ”—

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

showYHistogram()

spanπŸ”—

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

span(w: number)

targetsπŸ”—

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

targets(targets: cog.Builder<cog.Dataquery>[])

thresholdsπŸ”—

Map numeric values to states

thresholds(thresholds: cog.Builder<dashboard.ThresholdsConfig>)

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

timeFrom(timeFrom: string)

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

timeShift(timeShift: string)

titleπŸ”—

Panel title.

title(title: string)

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.

transformations(transformations: dashboard.DataTransformerConfig[])

transparentπŸ”—

Whether to display the panel without a background.

transparent(transparent: boolean)

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(unit: string)

withOverrideπŸ”—

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

withOverride(override: {
    matcher: dashboard.MatcherConfig;
    properties: dashboard.DynamicConfigValue[];
})

withTargetπŸ”—

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

withTarget(target: cog.Builder<cog.Dataquery>)

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.

withTransformation(transformation: dashboard.DataTransformerConfig)

yAxisπŸ”—

Controls yAxis placement

yAxis(yAxis: cog.Builder<heatmap.YAxisConfig>)

See alsoπŸ”—