Clickable links in Canvas panel elements

  • What Grafana version and what operating system are you using?
    Grafana v9.4.0beta1 (1b0f5f0a81) on Ubuntu 20.04.5 LTS

  • What are you trying to achieve?
    Create clickable links within a Canvas panel

  • How are you trying to achieve it?
    From what I’ve been able to find online, the current method for creating clickable links in a Canvas panel is via Data Links, but I have had no luck seeing any change to Canvas elements after adding a Data Link to the Canvas panel

  • What happened?
    No clickable links

  • What did you expect to happen?
    Clickable links

  • Can you copy/paste the configuration(s) that you are having problems with?
    No. It’s very likely I’m missing something obvious, but I can’t connect the Data Link panel-level item with individual elements.

  • Did you receive any errors in the Grafana UI or in related logs? If so, please tell us exactly what they were.
    No

  • Did you follow any online instructions? If so, what is the URL?
    The following links point to various GitHub pages and Grafana documentation, but I’m missing the missing link:

I love the finer control over layout that the Canvas panel type offers, but the last thing that’s keeping me from rolling out a proof of concept for a summary status dashboard that links down into detailed views of the systems being summarized is the ability to click on a Canvas element to browse between Grafana dashboards.

What would help me the most are step by step instructions that show how add a Canvas element within a dashboard panel that goes to a URL when it is clicked. Thanks!

@markstokosa I was able to create a data link, but it’s showing as a tooltip for every element. I’m going to follow up with our devs to find out (and document) how to link the data link to a specific element.

Stay tuned!

@markstokosa I found out how to do this!

Here are the steps to create a clickable data link in a canvas panel

Note: Inline editing must be turned off AND current support is for text/metric elements only

This process creates a data link tied to all elements that use the field name

  1. Create a text or metric element in your canvas panel
  2. In the Editor, select a field for your metric value
  3. In the Overrides tab (in the panel editor) create an override for fields with name and click the + add override property button.
  4. Select Datalinks > Datalinks from the list
  5. Click +Add link and add a description and URL for the data link

Workaround if you have multiple elements that reference the same field name

  1. In the panel editor for the canvas panel, go to the transform tab
  2. Click + Add Transformation and select Add field from calculation
  3. Choose Reduce Row from the dropdown and click on the field name that you want to use for the element
  4. Select All Values from the Calculation drop down
  5. Add an alias for the field name. This step will create a new and unique field that you can reference as the field name to create the element and field override described in the previous process.

I created a PR to add this information to our docs, so please let me know if you have feedback on the steps :slight_smile:

Thank you so much! I was able to create and successfully test a link using these instructions.

This is good enough for now, but if there is any way in the future to get rid of the need to hover, click, and click again to follow a link attached to a Canvas element, that would be fantastic.

I envision it being a “Hyperlink” section under “Selected element” like Text, Layout, Background (text), or Border (text) are currently for the text element type.

1 Like

@markstokosa thank you for the feedback, we’ll add it to our agenda for our next office ours with the dev squad working on this feature.

How do you get it to work with text?