DOCS: Update to add transform steps for canvas data links (#64770)

* Update to add transform steps for data links

https://github.com/grafana/grafana/pull/64456 was merged and I have one more edit

* style fixes

* Update docs/sources/panels-visualizations/visualizations/canvas/index.md

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

* empty commit to force linting

* ran prettier

---------

Co-authored-by: Isabel <76437239+imatwawana@users.noreply.github.com>
Co-authored-by: Isabel Matwawana <isabel.matwawana@grafana.com>
This commit is contained in:
Melori Arellano 2023-03-14 15:40:03 -06:00 committed by GitHub
parent 6b95b3f8aa
commit 10c809a00a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -84,7 +84,7 @@ The inline editing toggle enables you to lock or unlock the canvas panel. When t
### Data links
Canvas supports [data links](https://grafana.com/docs/grafana/latest/panels-visualizations/configure-data-links/). You can create a data link for a metric-value element and display it by following these steps:
Canvas supports [data links](https://grafana.com/docs/grafana/latest/panels-visualizations/configure-data-links/). You can create a data link for a metric-value element and display it for all elements that use the field name by following these steps:
1. Set an element to be tied to a field value.
1. Turn off the inline editing toggle.
@ -95,6 +95,13 @@ Canvas supports [data links](https://grafana.com/docs/grafana/latest/panels-visu
1. Hover over the element to display the data link tooltip.
1. Click on the element to be able to open the data link.
If multiple elements use the same field, you can create a unique field name using the [add field from calculation transform](https://grafana.com/docs/grafana/latest/panels-visualizations/query-transform-data/transform-data/#add-field-from-calculation). The alias you create in the transformation will appear as a field you can use with an element.
If multiple elements use the same field name, and you want to control which elements display the data link, you can create a unique field name using the [add field from calculation transform](https://grafana.com/docs/grafana/latest/panels-visualizations/query-transform-data/transform-data/#add-field-from-calculation). The alias you create in the transformation will appear as a field you can use with an element.
1. In the panel editor for the canvas panel, click the **Transform** tab.
1. Select **Add field from calculation** from the list of transformations, or click **+ Add transformation** to display the list first.
1. Choose **Reduce row** from the dropdown and click the field name that you want to use for the element.
1. Select **All Values** from the **Calculation** dropdown.
1. Add an alias for the field name.
1. Reference the new unique field alias to create the element and field override.
{{< video-embed src="/media/docs/grafana/canvas-data-links-9-4-0.mp4" max-width="750px" caption="Data links demo" >}}