Skip to content

heatmap

grafonnet.panel.heatmap

Subpackages

Index

Fields

fn new

new(title)

PARAMETERS:

  • title (string)

Creates a new heatmap panel with a title.

obj fieldConfig

obj fieldConfig.defaults

obj fieldConfig.defaults.custom
fn fieldConfig.defaults.custom.withHideFrom
fieldConfig.defaults.custom.withHideFrom(value)

PARAMETERS:

  • value (object)

TODO docs

fn fieldConfig.defaults.custom.withHideFromMixin
fieldConfig.defaults.custom.withHideFromMixin(value)

PARAMETERS:

  • value (object)

TODO docs

fn fieldConfig.defaults.custom.withScaleDistribution
fieldConfig.defaults.custom.withScaleDistribution(value)

PARAMETERS:

  • value (object)

TODO docs

fn fieldConfig.defaults.custom.withScaleDistributionMixin
fieldConfig.defaults.custom.withScaleDistributionMixin(value)

PARAMETERS:

  • value (object)

TODO docs

obj fieldConfig.defaults.custom.hideFrom
# fn fieldConfig.defaults.custom.hideFrom.withLegend
fieldConfig.defaults.custom.hideFrom.withLegend(value=true)

PARAMETERS:

  • value (boolean)
    • default value: true
# fn fieldConfig.defaults.custom.hideFrom.withTooltip
fieldConfig.defaults.custom.hideFrom.withTooltip(value=true)

PARAMETERS:

  • value (boolean)
    • default value: true
# fn fieldConfig.defaults.custom.hideFrom.withViz
fieldConfig.defaults.custom.hideFrom.withViz(value=true)

PARAMETERS:

  • value (boolean)
    • default value: true
obj fieldConfig.defaults.custom.scaleDistribution
# fn fieldConfig.defaults.custom.scaleDistribution.withLinearThreshold
fieldConfig.defaults.custom.scaleDistribution.withLinearThreshold(value)

PARAMETERS:

  • value (number)
# fn fieldConfig.defaults.custom.scaleDistribution.withLog
fieldConfig.defaults.custom.scaleDistribution.withLog(value)

PARAMETERS:

  • value (number)
# fn fieldConfig.defaults.custom.scaleDistribution.withType
fieldConfig.defaults.custom.scaleDistribution.withType(value)

PARAMETERS:

  • value (string)
    • valid values: "linear", "log", "ordinal", "symlog"

TODO docs

obj libraryPanel

fn libraryPanel.withName

libraryPanel.withName(value)

PARAMETERS:

  • value (string)

Library panel name

fn libraryPanel.withUid

libraryPanel.withUid(value)

PARAMETERS:

  • value (string)

Library panel uid

obj options

fn options.withCalculate

options.withCalculate(value=true)

PARAMETERS:

  • value (boolean)
    • default value: true

Controls if the heatmap should be calculated from data

fn options.withCalculation

options.withCalculation(value)

PARAMETERS:

  • value (object)

fn options.withCalculationMixin

options.withCalculationMixin(value)

PARAMETERS:

  • value (object)

fn options.withCellGap

options.withCellGap(value=1)

PARAMETERS:

  • value (integer)
    • default value: 1

Controls gap between cells

fn options.withCellRadius

options.withCellRadius(value)

PARAMETERS:

  • value (number)

Controls cell radius

fn options.withCellValues

options.withCellValues(value={})

PARAMETERS:

  • value (object)
    • default value: {}

Controls cell value unit

fn options.withCellValuesMixin

options.withCellValuesMixin(value={})

PARAMETERS:

  • value (object)
    • default value: {}

Controls cell value unit

fn options.withColor

options.withColor(value={"exponent": 0.5,"fill": "dark-orange","reverse": false,"scheme": "Oranges","steps": 64})

PARAMETERS:

  • value (object)
    • default value: {"exponent": 0.5,"fill": "dark-orange","reverse": false,"scheme": "Oranges","steps": 64}

Controls the color options

fn options.withColorMixin

options.withColorMixin(value={"exponent": 0.5,"fill": "dark-orange","reverse": false,"scheme": "Oranges","steps": 64})

PARAMETERS:

  • value (object)
    • default value: {"exponent": 0.5,"fill": "dark-orange","reverse": false,"scheme": "Oranges","steps": 64}

Controls the color options

fn options.withExemplars

options.withExemplars(value)

PARAMETERS:

  • value (object)

Controls exemplar options

fn options.withExemplarsMixin

options.withExemplarsMixin(value)

PARAMETERS:

  • value (object)

Controls exemplar options

fn options.withFilterValues

options.withFilterValues(value={"le": 0.000000001})

PARAMETERS:

  • value (object)
    • default value: {"le": 0.000000001}

Filters values between a given range

fn options.withFilterValuesMixin

options.withFilterValuesMixin(value={"le": 0.000000001})

PARAMETERS:

  • value (object)
    • default value: {"le": 0.000000001}

Filters values between a given range

fn options.withLegend

options.withLegend(value)

PARAMETERS:

  • value (object)

Controls legend options

fn options.withLegendMixin

options.withLegendMixin(value)

PARAMETERS:

  • value (object)

Controls legend options

fn options.withRowsFrame

options.withRowsFrame(value)

PARAMETERS:

  • value (object)

Controls frame rows options

fn options.withRowsFrameMixin

options.withRowsFrameMixin(value)

PARAMETERS:

  • value (object)

Controls frame rows options

fn options.withShowValue

options.withShowValue(value)

PARAMETERS:

  • value (string)

| *{ 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

fn options.withTooltip

options.withTooltip(value={"mode": "single","showColorScale": false,"yHistogram": false})

PARAMETERS:

  • value (object)
    • default value: {"mode": "single","showColorScale": false,"yHistogram": false}

Controls tooltip options

fn options.withTooltipMixin

options.withTooltipMixin(value={"mode": "single","showColorScale": false,"yHistogram": false})

PARAMETERS:

  • value (object)
    • default value: {"mode": "single","showColorScale": false,"yHistogram": false}

Controls tooltip options

fn options.withYAxis

options.withYAxis(value)

PARAMETERS:

  • value (object)

Configuration options for the yAxis

fn options.withYAxisMixin

options.withYAxisMixin(value)

PARAMETERS:

  • value (object)

Configuration options for the yAxis

obj options.calculation

fn options.calculation.withXBuckets
options.calculation.withXBuckets(value)

PARAMETERS:

  • value (object)
fn options.calculation.withXBucketsMixin
options.calculation.withXBucketsMixin(value)

PARAMETERS:

  • value (object)
fn options.calculation.withYBuckets
options.calculation.withYBuckets(value)

PARAMETERS:

  • value (object)
fn options.calculation.withYBucketsMixin
options.calculation.withYBucketsMixin(value)

PARAMETERS:

  • value (object)
obj options.calculation.xBuckets
fn options.calculation.xBuckets.withMode
options.calculation.xBuckets.withMode(value)

PARAMETERS:

  • value (string)
    • valid values: "size", "count"
fn options.calculation.xBuckets.withScale
options.calculation.xBuckets.withScale(value)

PARAMETERS:

  • value (object)

TODO docs

fn options.calculation.xBuckets.withScaleMixin
options.calculation.xBuckets.withScaleMixin(value)

PARAMETERS:

  • value (object)

TODO docs

fn options.calculation.xBuckets.withValue
options.calculation.xBuckets.withValue(value)

PARAMETERS:

  • value (string)

The number of buckets to use for the axis in the heatmap

obj options.calculation.xBuckets.scale
# fn options.calculation.xBuckets.scale.withLinearThreshold
options.calculation.xBuckets.scale.withLinearThreshold(value)

PARAMETERS:

  • value (number)
# fn options.calculation.xBuckets.scale.withLog
options.calculation.xBuckets.scale.withLog(value)

PARAMETERS:

  • value (number)
# fn options.calculation.xBuckets.scale.withType
options.calculation.xBuckets.scale.withType(value)

PARAMETERS:

  • value (string)
    • valid values: "linear", "log", "ordinal", "symlog"

TODO docs

obj options.calculation.yBuckets
fn options.calculation.yBuckets.withMode
options.calculation.yBuckets.withMode(value)

PARAMETERS:

  • value (string)
    • valid values: "size", "count"
fn options.calculation.yBuckets.withScale
options.calculation.yBuckets.withScale(value)

PARAMETERS:

  • value (object)

TODO docs

fn options.calculation.yBuckets.withScaleMixin
options.calculation.yBuckets.withScaleMixin(value)

PARAMETERS:

  • value (object)

TODO docs

fn options.calculation.yBuckets.withValue
options.calculation.yBuckets.withValue(value)

PARAMETERS:

  • value (string)

The number of buckets to use for the axis in the heatmap

obj options.calculation.yBuckets.scale
# fn options.calculation.yBuckets.scale.withLinearThreshold
options.calculation.yBuckets.scale.withLinearThreshold(value)

PARAMETERS:

  • value (number)
# fn options.calculation.yBuckets.scale.withLog
options.calculation.yBuckets.scale.withLog(value)

PARAMETERS:

  • value (number)
# fn options.calculation.yBuckets.scale.withType
options.calculation.yBuckets.scale.withType(value)

PARAMETERS:

  • value (string)
    • valid values: "linear", "log", "ordinal", "symlog"

TODO docs

obj options.cellValues

fn options.cellValues.withCellValues
options.cellValues.withCellValues(value)

PARAMETERS:

  • value (object)

Controls cell value options

fn options.cellValues.withCellValuesMixin
options.cellValues.withCellValuesMixin(value)

PARAMETERS:

  • value (object)

Controls cell value options

obj options.cellValues.CellValues
fn options.cellValues.CellValues.withDecimals
options.cellValues.CellValues.withDecimals(value)

PARAMETERS:

  • value (number)

Controls the number of decimals for cell values

fn options.cellValues.CellValues.withUnit
options.cellValues.CellValues.withUnit(value)

PARAMETERS:

  • value (string)

Controls the cell value unit

obj options.color

fn options.color.withHeatmapColorOptions
options.color.withHeatmapColorOptions(value)

PARAMETERS:

  • value (object)

Controls various color options

fn options.color.withHeatmapColorOptionsMixin
options.color.withHeatmapColorOptionsMixin(value)

PARAMETERS:

  • value (object)

Controls various color options

obj options.color.HeatmapColorOptions
fn options.color.HeatmapColorOptions.withExponent
options.color.HeatmapColorOptions.withExponent(value)

PARAMETERS:

  • value (number)

Controls the exponent when scale is set to exponential

fn options.color.HeatmapColorOptions.withFill
options.color.HeatmapColorOptions.withFill(value)

PARAMETERS:

  • value (string)

Controls the color fill when in opacity mode

fn options.color.HeatmapColorOptions.withMax
options.color.HeatmapColorOptions.withMax(value)

PARAMETERS:

  • value (number)

Sets the maximum value for the color scale

fn options.color.HeatmapColorOptions.withMin
options.color.HeatmapColorOptions.withMin(value)

PARAMETERS:

  • value (number)

Sets the minimum value for the color scale

fn options.color.HeatmapColorOptions.withMode
options.color.HeatmapColorOptions.withMode(value)

PARAMETERS:

  • value (string)
    • valid values: "opacity", "scheme"

Controls the color mode of the heatmap

fn options.color.HeatmapColorOptions.withReverse
options.color.HeatmapColorOptions.withReverse(value=true)

PARAMETERS:

  • value (boolean)
    • default value: true

Reverses the color scheme

fn options.color.HeatmapColorOptions.withScale
options.color.HeatmapColorOptions.withScale(value)

PARAMETERS:

  • value (string)
    • valid values: "linear", "exponential"

Controls the color scale of the heatmap

fn options.color.HeatmapColorOptions.withScheme
options.color.HeatmapColorOptions.withScheme(value)

PARAMETERS:

  • value (string)

Controls the color scheme used

fn options.color.HeatmapColorOptions.withSteps
options.color.HeatmapColorOptions.withSteps(value)

PARAMETERS:

  • value (integer)

Controls the number of color steps

obj options.exemplars

fn options.exemplars.withColor
options.exemplars.withColor(value)

PARAMETERS:

  • value (string)

Sets the color of the exemplar markers

obj options.filterValues

fn options.filterValues.withFilterValueRange
options.filterValues.withFilterValueRange(value)

PARAMETERS:

  • value (object)

Controls the value filter range

fn options.filterValues.withFilterValueRangeMixin
options.filterValues.withFilterValueRangeMixin(value)

PARAMETERS:

  • value (object)

Controls the value filter range

obj options.filterValues.FilterValueRange
fn options.filterValues.FilterValueRange.withGe
options.filterValues.FilterValueRange.withGe(value)

PARAMETERS:

  • value (number)

Sets the filter range to values greater than or equal to the given value

fn options.filterValues.FilterValueRange.withLe
options.filterValues.FilterValueRange.withLe(value)

PARAMETERS:

  • value (number)

Sets the filter range to values less than or equal to the given value

obj options.legend

fn options.legend.withShow
options.legend.withShow(value=true)

PARAMETERS:

  • value (boolean)
    • default value: true

Controls if the legend is shown

obj options.rowsFrame

fn options.rowsFrame.withLayout
options.rowsFrame.withLayout(value)

PARAMETERS:

  • value (string)
    • valid values: "le", "ge", "unknown", "auto"
fn options.rowsFrame.withValue
options.rowsFrame.withValue(value)

PARAMETERS:

  • value (string)

Sets the name of the cell when not calculating from data

obj options.tooltip

fn options.tooltip.withHeatmapTooltip
options.tooltip.withHeatmapTooltip(value)

PARAMETERS:

  • value (object)

Controls tooltip options

fn options.tooltip.withHeatmapTooltipMixin
options.tooltip.withHeatmapTooltipMixin(value)

PARAMETERS:

  • value (object)

Controls tooltip options

obj options.tooltip.HeatmapTooltip
fn options.tooltip.HeatmapTooltip.withMaxHeight
options.tooltip.HeatmapTooltip.withMaxHeight(value)

PARAMETERS:

  • value (number)
fn options.tooltip.HeatmapTooltip.withMaxWidth
options.tooltip.HeatmapTooltip.withMaxWidth(value)

PARAMETERS:

  • value (number)
fn options.tooltip.HeatmapTooltip.withMode
options.tooltip.HeatmapTooltip.withMode(value)

PARAMETERS:

  • value (string)
    • valid values: "single", "multi", "none"

TODO docs

fn options.tooltip.HeatmapTooltip.withShowColorScale
options.tooltip.HeatmapTooltip.withShowColorScale(value=true)

PARAMETERS:

  • value (boolean)
    • default value: true

Controls if the tooltip shows a color scale in header

fn options.tooltip.HeatmapTooltip.withYHistogram
options.tooltip.HeatmapTooltip.withYHistogram(value=true)

PARAMETERS:

  • value (boolean)
    • default value: true

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

obj options.yAxis

fn options.yAxis.withAxisBorderShow
options.yAxis.withAxisBorderShow(value=true)

PARAMETERS:

  • value (boolean)
    • default value: true
fn options.yAxis.withAxisCenteredZero
options.yAxis.withAxisCenteredZero(value=true)

PARAMETERS:

  • value (boolean)
    • default value: true
fn options.yAxis.withAxisColorMode
options.yAxis.withAxisColorMode(value)

PARAMETERS:

  • value (string)
    • valid values: "text", "series"

TODO docs

fn options.yAxis.withAxisGridShow
options.yAxis.withAxisGridShow(value=true)

PARAMETERS:

  • value (boolean)
    • default value: true
fn options.yAxis.withAxisLabel
options.yAxis.withAxisLabel(value)

PARAMETERS:

  • value (string)
fn options.yAxis.withAxisPlacement
options.yAxis.withAxisPlacement(value)

PARAMETERS:

  • value (string)
    • valid values: "auto", "top", "right", "bottom", "left", "hidden"

TODO docs

fn options.yAxis.withAxisSoftMax
options.yAxis.withAxisSoftMax(value)

PARAMETERS:

  • value (number)
fn options.yAxis.withAxisSoftMin
options.yAxis.withAxisSoftMin(value)

PARAMETERS:

  • value (number)
fn options.yAxis.withAxisWidth
options.yAxis.withAxisWidth(value)

PARAMETERS:

  • value (number)
fn options.yAxis.withDecimals
options.yAxis.withDecimals(value)

PARAMETERS:

  • value (number)

Controls the number of decimals for yAxis values

fn options.yAxis.withMax
options.yAxis.withMax(value)

PARAMETERS:

  • value (number)

Sets the maximum value for the yAxis

fn options.yAxis.withMin
options.yAxis.withMin(value)

PARAMETERS:

  • value (number)

Sets the minimum value for the yAxis

fn options.yAxis.withReverse
options.yAxis.withReverse(value=true)

PARAMETERS:

  • value (boolean)
    • default value: true

Reverses the yAxis

fn options.yAxis.withScaleDistribution
options.yAxis.withScaleDistribution(value)

PARAMETERS:

  • value (object)

TODO docs

fn options.yAxis.withScaleDistributionMixin
options.yAxis.withScaleDistributionMixin(value)

PARAMETERS:

  • value (object)

TODO docs

fn options.yAxis.withUnit
options.yAxis.withUnit(value)

PARAMETERS:

  • value (string)

Sets the yAxis unit

obj options.yAxis.scaleDistribution
fn options.yAxis.scaleDistribution.withLinearThreshold
options.yAxis.scaleDistribution.withLinearThreshold(value)

PARAMETERS:

  • value (number)
fn options.yAxis.scaleDistribution.withLog
options.yAxis.scaleDistribution.withLog(value)

PARAMETERS:

  • value (number)
fn options.yAxis.scaleDistribution.withType
options.yAxis.scaleDistribution.withType(value)

PARAMETERS:

  • value (string)
    • valid values: "linear", "log", "ordinal", "symlog"

TODO docs

obj panelOptions

fn panelOptions.withDescription

panelOptions.withDescription(value)

PARAMETERS:

  • value (string)

Panel description.

fn panelOptions.withGridPos

panelOptions.withGridPos(h="null", w="null", x="null", y="null")

PARAMETERS:

  • h (number)
    • default value: "null"
  • w (number)
    • default value: "null"
  • x (number)
    • default value: "null"
  • y (number)
    • default value: "null"

withGridPos configures the height, width and xy coordinates of the panel. Also see grafonnet.util.grid for helper functions to calculate these fields.

All arguments default to null, which means they will remain unchanged or unset.

panelOptions.withLinks(value)

PARAMETERS:

  • value (array)

Panel links.

fn panelOptions.withLinksMixin

panelOptions.withLinksMixin(value)

PARAMETERS:

  • value (array)

Panel links.

fn panelOptions.withRepeat

panelOptions.withRepeat(value)

PARAMETERS:

  • value (string)

Name of template variable to repeat for.

fn panelOptions.withRepeatDirection

panelOptions.withRepeatDirection(value="h")

PARAMETERS:

  • value (string)
    • default value: "h"
    • valid values: "h", "v"

Direction to repeat in if 'repeat' is set. h for horizontal, v for vertical.

fn panelOptions.withTitle

panelOptions.withTitle(value)

PARAMETERS:

  • value (string)

Panel title.

fn panelOptions.withTransparent

panelOptions.withTransparent(value=true)

PARAMETERS:

  • value (boolean)
    • default value: true

Whether to display the panel without a background.

obj queryOptions

fn queryOptions.withDatasource

queryOptions.withDatasource(type, uid)

PARAMETERS:

  • type (string)
  • uid (string)

withDatasource sets the datasource for all queries in a panel.

The default datasource for a panel is set to 'Mixed datasource' so panels can be datasource agnostic, which is a lot more interesting from a reusability standpoint. Note that this requires query targets to explicitly set datasource for the same reason.

fn queryOptions.withDatasourceMixin

queryOptions.withDatasourceMixin(value)

PARAMETERS:

  • value (object)

Ref to a DataSource instance

fn queryOptions.withInterval

queryOptions.withInterval(value)

PARAMETERS:

  • value (string)

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

fn queryOptions.withMaxDataPoints

queryOptions.withMaxDataPoints(value)

PARAMETERS:

  • value (number)

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

fn queryOptions.withTargets

queryOptions.withTargets(value)

PARAMETERS:

  • value (array)

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

fn queryOptions.withTargetsMixin

queryOptions.withTargetsMixin(value)

PARAMETERS:

  • value (array)

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

fn queryOptions.withTimeFrom

queryOptions.withTimeFrom(value)

PARAMETERS:

  • value (string)

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

fn queryOptions.withTimeShift

queryOptions.withTimeShift(value)

PARAMETERS:

  • value (string)

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

fn queryOptions.withTransformations

queryOptions.withTransformations(value)

PARAMETERS:

  • value (array)

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.

fn queryOptions.withTransformationsMixin

queryOptions.withTransformationsMixin(value)

PARAMETERS:

  • value (array)

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.

obj standardOptions

fn standardOptions.withDecimals

standardOptions.withDecimals(value)

PARAMETERS:

  • value (number)

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.

fn standardOptions.withDisplayName

standardOptions.withDisplayName(value)

PARAMETERS:

  • value (string)

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

fn standardOptions.withFilterable

standardOptions.withFilterable(value=true)

PARAMETERS:

  • value (boolean)
    • default value: true

True if data source field supports ad-hoc filters

standardOptions.withLinks(value)

PARAMETERS:

  • value (array)

The behavior when clicking on a result

fn standardOptions.withLinksMixin

standardOptions.withLinksMixin(value)

PARAMETERS:

  • value (array)

The behavior when clicking on a result

fn standardOptions.withMappings

standardOptions.withMappings(value)

PARAMETERS:

  • value (array)

Convert input values into a display string

fn standardOptions.withMappingsMixin

standardOptions.withMappingsMixin(value)

PARAMETERS:

  • value (array)

Convert input values into a display string

fn standardOptions.withMax

standardOptions.withMax(value)

PARAMETERS:

  • value (number)

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

fn standardOptions.withMin

standardOptions.withMin(value)

PARAMETERS:

  • value (number)

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

fn standardOptions.withNoValue

standardOptions.withNoValue(value)

PARAMETERS:

  • value (string)

Alternative to empty string

fn standardOptions.withOverrides

standardOptions.withOverrides(value)

PARAMETERS:

  • value (array)

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

fn standardOptions.withOverridesMixin

standardOptions.withOverridesMixin(value)

PARAMETERS:

  • value (array)

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

fn standardOptions.withPath

standardOptions.withPath(value)

PARAMETERS:

  • value (string)

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

fn standardOptions.withUnit

standardOptions.withUnit(value)

PARAMETERS:

  • value (string)

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.

obj standardOptions.color

fn standardOptions.color.withFixedColor
standardOptions.color.withFixedColor(value)

PARAMETERS:

  • value (string)

The fixed color value for fixed or shades color modes.

fn standardOptions.color.withMode
standardOptions.color.withMode(value)

PARAMETERS:

  • value (string)
    • valid values: "thresholds", "palette-classic", "palette-classic-by-name", "continuous-GrYlRd", "continuous-RdYlGr", "continuous-BlYlRd", "continuous-YlRd", "continuous-BlPu", "continuous-YlBl", "continuous-blues", "continuous-reds", "continuous-greens", "continuous-purples", "fixed", "shades"

Color mode for a field. You can specify a single color, or select a continuous (gradient) color schemes, based on a value. Continuous color interpolates a color using the percentage of a value relative to min and max. Accepted values are: thresholds: From thresholds. Informs Grafana to take the color from the matching threshold palette-classic: Classic palette. Grafana will assign color by looking up a color in a palette by series index. Useful for Graphs and pie charts and other categorical data visualizations palette-classic-by-name: Classic palette (by name). Grafana will assign color by looking up a color in a palette by series name. Useful for Graphs and pie charts and other categorical data visualizations continuous-GrYlRd: ontinuous Green-Yellow-Red palette mode continuous-RdYlGr: Continuous Red-Yellow-Green palette mode continuous-BlYlRd: Continuous Blue-Yellow-Red palette mode continuous-YlRd: Continuous Yellow-Red palette mode continuous-BlPu: Continuous Blue-Purple palette mode continuous-YlBl: Continuous Yellow-Blue palette mode continuous-blues: Continuous Blue palette mode continuous-reds: Continuous Red palette mode continuous-greens: Continuous Green palette mode continuous-purples: Continuous Purple palette mode shades: Shades of a single color. Specify a single color, useful in an override rule. fixed: Fixed color mode. Specify a single color, useful in an override rule.

fn standardOptions.color.withSeriesBy
standardOptions.color.withSeriesBy(value)

PARAMETERS:

  • value (string)
    • valid values: "min", "max", "last"

Defines how to assign a series color from "by value" color schemes. For example for an aggregated data points like a timeseries, the color can be assigned by the min, max or last value.

obj standardOptions.thresholds

fn standardOptions.thresholds.withMode
standardOptions.thresholds.withMode(value)

PARAMETERS:

  • value (string)
    • valid values: "absolute", "percentage"

Thresholds can either be absolute (specific number) or percentage (relative to min or max, it will be values between 0 and 1).

fn standardOptions.thresholds.withSteps
standardOptions.thresholds.withSteps(value)

PARAMETERS:

  • value (array)

Must be sorted by 'value', first value is always -Infinity

fn standardOptions.thresholds.withStepsMixin
standardOptions.thresholds.withStepsMixin(value)

PARAMETERS:

  • value (array)

Must be sorted by 'value', first value is always -Infinity