Skip to content

PanelπŸ”—

ConstructorπŸ”—

Panel()

MethodsπŸ”—

buildπŸ”—

Builds the object.

def build() -> dashboard.Panel

cache_timeoutπŸ”—

Sets panel queries cache timeout.

def cache_timeout(cache_timeout: str) -> typing.Self

calculateπŸ”—

Controls if the heatmap should be calculated from data

def calculate(calculate: bool) -> typing.Self

calculationπŸ”—

Calculation options for the heatmap

def calculation(calculation: cogbuilder.Builder[common.HeatmapCalculationOptions]) -> typing.Self

cell_gapπŸ”—

Controls gap between cells

def cell_gap(cell_gap: int) -> typing.Self

cell_radiusπŸ”—

Controls cell radius

def cell_radius(cell_radius: float) -> typing.Self

cell_valuesπŸ”—

Controls cell value unit

def cell_values(cell_values: cogbuilder.Builder[heatmap.CellValues]) -> typing.Self

colorπŸ”—

Controls the color options

def color(color: cogbuilder.Builder[heatmap.HeatmapColorOptions]) -> typing.Self

color_schemeπŸ”—

Panel color configuration

def color_scheme(color: cogbuilder.Builder[dashboard.FieldColor]) -> typing.Self

datasourceπŸ”—

The datasource used in all targets.

def datasource(datasource: dashboard.DataSourceRef) -> typing.Self

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.

def decimals(decimals: float) -> typing.Self

descriptionπŸ”—

Panel description.

def description(description: str) -> typing.Self

display_nameπŸ”—

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

def display_name(display_name: str) -> typing.Self

exemplars_colorπŸ”—

Controls exemplar options

def exemplars_color(color: str) -> typing.Self

filter_valuesπŸ”—

Filters values between a given range

def filter_values(filter_values: cogbuilder.Builder[heatmap.FilterValueRange]) -> typing.Self

grid_posπŸ”—

Grid position.

def grid_pos(grid_pos: dashboard.GridPos) -> typing.Self

heightπŸ”—

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

def height(h: int) -> typing.Self

hide_fromπŸ”—

def hide_from(hide_from: cogbuilder.Builder[common.HideSeriesConfig]) -> typing.Self

hide_legendπŸ”—

| *{

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

}

Controls legend options

def hide_legend() -> typing.Self

hide_time_overrideπŸ”—

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

def hide_time_override(hide_time_override: bool) -> typing.Self

hide_y_histogramπŸ”—

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

def hide_y_histogram() -> typing.Self

id_valπŸ”—

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

def id_val(id_val: int) -> typing.Self

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

def interval(interval: str) -> typing.Self

library_panelπŸ”—

Dynamically load the panel

def library_panel(library_panel: dashboard.LibraryPanelRef) -> typing.Self

Panel links.

def links(links: list[cogbuilder.Builder[dashboard.DashboardLink]]) -> typing.Self

mappingsπŸ”—

Convert input values into a display string

def mappings(mappings: list[dashboard.ValueMapping]) -> typing.Self

max_valπŸ”—

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

def max_val(max_val: float) -> typing.Self

max_data_pointsπŸ”—

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

def max_data_points(max_data_points: float) -> typing.Self

max_heightπŸ”—

def max_height(max_height: float) -> typing.Self

max_per_rowπŸ”—

Option for repeated panels that controls max items per row

Only relevant for horizontally repeated panels

def max_per_row(max_per_row: float) -> typing.Self

max_widthπŸ”—

def max_width(max_width: float) -> typing.Self

min_valπŸ”—

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

def min_val(min_val: float) -> typing.Self

modeπŸ”—

Controls how the tooltip is shown

def mode(mode: common.TooltipDisplayMode) -> typing.Self

no_valueπŸ”—

Alternative to empty string

def no_value(no_value: str) -> typing.Self

overridesπŸ”—

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

def overrides(overrides: list[cogbuilder.Builder[dashboard.DashboardFieldConfigSourceOverrides]]) -> typing.Self

query_caching_ttlπŸ”—

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

def query_caching_ttl(query_caching_ttl: float) -> typing.Self

repeatπŸ”—

Name of template variable to repeat for.

def repeat(repeat: str) -> typing.Self

repeat_directionπŸ”—

Direction to repeat in if 'repeat' is set.

h for horizontal, v for vertical.

def repeat_direction(repeat_direction: typing.Literal["h", "v"]) -> typing.Self

rows_frameπŸ”—

Controls tick alignment and value name when not calculating from data

def rows_frame(rows_frame: cogbuilder.Builder[heatmap.RowsHeatmapOptions]) -> typing.Self

scale_distributionπŸ”—

def scale_distribution(scale_distribution: cogbuilder.Builder[common.ScaleDistributionConfig]) -> typing.Self

selection_modeπŸ”—

Controls which axis to allow selection on

def selection_mode(selection_mode: heatmap.HeatmapSelectionMode) -> typing.Self

show_color_scaleπŸ”—

Controls if the tooltip shows a color scale in header

def show_color_scale(show_color_scale: bool) -> typing.Self

show_legendπŸ”—

| *{

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

}

Controls legend options

def show_legend() -> typing.Self

show_valueπŸ”—

| *{

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

def show_value(show_value: common.VisibilityMode) -> typing.Self

show_y_histogramπŸ”—

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

def show_y_histogram() -> typing.Self

spanπŸ”—

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

def span(w: int) -> typing.Self

targetsπŸ”—

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

def targets(targets: list[cogbuilder.Builder[cogvariants.Dataquery]]) -> typing.Self

thresholdsπŸ”—

Map numeric values to states

def thresholds(thresholds: cogbuilder.Builder[dashboard.ThresholdsConfig]) -> typing.Self

time_fromπŸ”—

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

def time_from(time_from: str) -> typing.Self

time_shiftπŸ”—

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

def time_shift(time_shift: str) -> typing.Self

titleπŸ”—

Panel title.

def title(title: str) -> typing.Self

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.

def transformations(transformations: list[dashboard.DataTransformerConfig]) -> typing.Self

transparentπŸ”—

Whether to display the panel without a background.

def transparent(transparent: bool) -> typing.Self

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.

def unit(unit: str) -> typing.Self

with_overrideπŸ”—

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

def with_override(matcher: dashboard.MatcherConfig, properties: list[dashboard.DynamicConfigValue]) -> typing.Self

with_targetπŸ”—

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

def with_target(target: cogbuilder.Builder[cogvariants.Dataquery]) -> typing.Self

with_transformationπŸ”—

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.

def with_transformation(transformation: dashboard.DataTransformerConfig) -> typing.Self

y_axisπŸ”—

Controls yAxis placement

def y_axis(y_axis: cogbuilder.Builder[heatmap.YAxisConfig]) -> typing.Self

See alsoπŸ”—