Docs: Templating: Replace __value.raw with __data.fields (#76408)

* adds information about __data.fields[0] which has replaced previously used __value.raw for getting both name and value of data

* my prettier ain't working correctly

* Update docs/sources/panels-visualizations/configure-data-links/index.md

Co-authored-by: Torkel Ödegaard <torkel@grafana.com>

* lint

* Update docs/sources/panels-visualizations/configure-data-links/index.md

Co-authored-by: Isabel <76437239+imatwawana@users.noreply.github.com>

* Update docs/sources/panels-visualizations/configure-data-links/index.md

Co-authored-by: Isabel <76437239+imatwawana@users.noreply.github.com>

* Update docs/sources/panels-visualizations/configure-data-links/index.md

Co-authored-by: Isabel <76437239+imatwawana@users.noreply.github.com>

* note: tooltip mode affects __value.raw

---------

Co-authored-by: Torkel Ödegaard <torkel@grafana.com>
Co-authored-by: Isabel <76437239+imatwawana@users.noreply.github.com>
This commit is contained in:
Polina Boneva 2023-10-17 11:59:00 +03:00 committed by GitHub
parent 2cab0d3d7c
commit e1838f92cf
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -50,7 +50,7 @@ These variables allow you to include the current time range in the data link URL
## Series variables
Series specific variables are available under `__series` namespace:
Series-specific variables are available under `__series` namespace:
- `__series.name` - series name to the URL
@ -71,6 +71,17 @@ Value-specific variables are available under `__value` namespace:
- `__value.text` - text representation of a value
- `__value.calc` - calculation name if the value is result of calculation
Using value-specific variables in data links can show different results depending on the set option of Tooltip mode.
## Data variables
To access values and labels from other fields use:
- `${__data.fields[i]}` - value of field `i` (on the same row)
- `${__data.fields["NameOfField"]}` - value of field using name instead of index
- `${__data.fields["NameOfField"]}` - value of field using name instead of index
- `${__data.fields[1].labels.cluster}` - access labels of another field
## Template variables
When linking to another dashboard that uses template variables, select variable values for whoever clicks the link.