Skip to content

PanelπŸ”—

ConstructorπŸ”—

Panel()

MethodsπŸ”—

buildπŸ”—

Builds the object.

def build() -> dashboard.Panel

axis_border_showπŸ”—

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

axis_centered_zeroπŸ”—

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

axis_color_modeπŸ”—

def axis_color_mode(axis_color_mode: common.AxisColorMode) -> typing.Self

axis_grid_showπŸ”—

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

axis_labelπŸ”—

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

axis_placementπŸ”—

def axis_placement(axis_placement: common.AxisPlacement) -> typing.Self

axis_soft_maxπŸ”—

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

axis_soft_minπŸ”—

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

axis_widthπŸ”—

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

cache_timeoutπŸ”—

Sets panel queries cache timeout.

def cache_timeout(cache_timeout: str) -> 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

dimsπŸ”—

Table Mode (auto)

def dims(dims: cogbuilder.Builder[xychart.XYDimensionConfig]) -> 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

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_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

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

labelπŸ”—

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

label_valueπŸ”—

def label_value(label_value: cogbuilder.Builder[common.TextDimensionConfig]) -> typing.Self

legendπŸ”—

def legend(legend: cogbuilder.Builder[common.VizLegendOptions]) -> typing.Self

library_panelπŸ”—

Dynamically load the panel

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

line_colorπŸ”—

def line_color(line_color: cogbuilder.Builder[common.ColorDimensionConfig]) -> typing.Self

line_styleπŸ”—

def line_style(line_style: cogbuilder.Builder[common.LineStyle]) -> typing.Self

line_widthπŸ”—

def line_width(line_width: int) -> 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_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

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

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

point_colorπŸ”—

def point_color(point_color: cogbuilder.Builder[common.ColorDimensionConfig]) -> typing.Self

point_sizeπŸ”—

def point_size(point_size: cogbuilder.Builder[common.ScaleDimensionConfig]) -> 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

scale_distributionπŸ”—

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

seriesπŸ”—

Manual Mode

def series(series: list[cogbuilder.Builder[xychart.ScatterSeriesConfig]]) -> typing.Self

series_mappingπŸ”—

def series_mapping(series_mapping: xychart.SeriesMapping) -> typing.Self

showπŸ”—

def show(show: xychart.ScatterShow) -> 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

tooltipπŸ”—

def tooltip(tooltip: cogbuilder.Builder[common.VizTooltipOptions]) -> 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

See alsoπŸ”—