From e1838f92cf1b378d73967ad25bf2be89b9003438 Mon Sep 17 00:00:00 2001 From: Polina Boneva <13227501+polibb@users.noreply.github.com> Date: Tue, 17 Oct 2023 11:59:00 +0300 Subject: [PATCH] Docs: Templating: Replace __value.raw with __data.fields (#76408) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * 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 * 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 Co-authored-by: Isabel <76437239+imatwawana@users.noreply.github.com> --- .../configure-data-links/index.md | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/docs/sources/panels-visualizations/configure-data-links/index.md b/docs/sources/panels-visualizations/configure-data-links/index.md index af4b8bad8ea..da954089d97 100644 --- a/docs/sources/panels-visualizations/configure-data-links/index.md +++ b/docs/sources/panels-visualizations/configure-data-links/index.md @@ -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.