Skip to content

Visualization🔗

Constructor🔗

Visualization()

Methods🔗

build🔗

Builds the object.

def build() -> dashboardv2beta1.VizConfigKind

actions🔗

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

def actions(actions: list[cogbuilder.Builder[dashboardv2beta1.Action]]) -> typing.Self

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

bar_alignment🔗

def bar_alignment(bar_alignment: common.BarAlignment) -> typing.Self

bar_max_width🔗

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

bar_width_factor🔗

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

candle_style🔗

Sets the style of the candlesticks

def candle_style(candle_style: candlestick.CandleStyle) -> typing.Self

color_scheme🔗

Panel color configuration

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

color_strategy🔗

Sets the color strategy for the candlesticks

def color_strategy(color_strategy: candlestick.ColorStrategy) -> typing.Self

colors🔗

Set which colors are used when the price movement is up or down

def colors(colors: cogbuilder.Builder[candlestick.CandlestickColors]) -> typing.Self

The behavior when clicking on a result

def data_links(links: list[object]) -> 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🔗

Human readable field metadata

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

display_name_from_ds🔗

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.

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

draw_style🔗

def draw_style(draw_style: common.GraphDrawStyle) -> typing.Self

field_min_max🔗

Calculate min max per field

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

fields🔗

Map fields to appropriate dimension

def fields(fields: cogbuilder.Builder[candlestick.CandlestickFieldMap]) -> typing.Self

fill_below_to🔗

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

fill_color🔗

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

fill_opacity🔗

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

gradient_mode🔗

def gradient_mode(gradient_mode: common.GraphGradientMode) -> typing.Self

hide_from🔗

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

include_all_fields🔗

When enabled, all fields will be sent to the graph

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

insert_nulls🔗

def insert_nulls(insert_nulls: typing.Union[bool, float]) -> typing.Self

legend🔗

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

line_color🔗

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

line_interpolation🔗

def line_interpolation(line_interpolation: common.LineInterpolation) -> typing.Self

line_style🔗

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

line_width🔗

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

mappings🔗

Convert input values into a display string

def mappings(mappings: list[dashboardv2beta1.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

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🔗

Sets which dimensions are used for the visualization

def mode(mode: candlestick.VizDisplayMode) -> typing.Self

no_value🔗

Alternative to empty string

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

null_value_mode🔗

How null values should be handled when calculating field stats

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

def null_value_mode(null_value_mode: dashboardv2beta1.NullValueMode) -> typing.Self

override🔗

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

def override(override: cogbuilder.Builder[dashboardv2beta1.Dashboardv2beta1FieldConfigSourceOverrides]) -> typing.Self

override_by_field_type🔗

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

def override_by_field_type(field_type: str, properties: list[dashboardv2beta1.DynamicConfigValue]) -> typing.Self

override_by_name🔗

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

def override_by_name(name: str, properties: list[dashboardv2beta1.DynamicConfigValue]) -> typing.Self

override_by_query🔗

def override_by_query(query_ref_id: str, properties: list[dashboardv2beta1.DynamicConfigValue]) -> typing.Self

override_by_regexp🔗

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

def override_by_regexp(regexp: str, properties: list[dashboardv2beta1.DynamicConfigValue]) -> typing.Self

overrides🔗

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

def overrides(overrides: list[cogbuilder.Builder[dashboardv2beta1.Dashboardv2beta1FieldConfigSourceOverrides]]) -> typing.Self

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

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

point_color🔗

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

point_size🔗

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

point_symbol🔗

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

scale_distribution🔗

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

show_points🔗

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

span_nulls🔗

Indicate if null values should be treated as gaps or connected.

When the value is a number, it represents the maximum delta in the

X axis that should be considered connected. For timeseries, this is milliseconds

def span_nulls(span_nulls: typing.Union[bool, float]) -> typing.Self

stacking🔗

def stacking(stacking: cogbuilder.Builder[common.StackingConfig]) -> typing.Self

thresholds🔗

Map numeric values to states

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

thresholds_style🔗

def thresholds_style(thresholds_style: cogbuilder.Builder[common.GraphThresholdsStyleConfig]) -> typing.Self

tooltip🔗

def tooltip(tooltip: cogbuilder.Builder[common.VizTooltipOptions]) -> typing.Self

transform🔗

def transform(transform: common.GraphTransform) -> 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

See also🔗