Hi, I am trying to integrate a datalink on my pie-chart such a way that if a section is clicked on the pie chart relevant data should be filtered in the table panel alongside it on the same dashboard.
I have four slabs in my pie chart, which are ranges of a parameter ‘FCR’. If I click on that section I want to see the data in table panel which belongs to that slab.
Basically I want to filter my table using the pie chart. Could you please help me with it? Let me know the extra information you need to understand my use case. I have attached the image of my dashboard.
you can use variables and datalinks.
i created a variable called test, created a new panel that shows $test, added a data link on the pie that passes the value, and then when i click on 60, it shows 60 on the right hand side:
data link looks like this:
https://play.grafana.org/d/-Kj3rZdGz/piechart?orgId=1&from=now-6h&to=now&timezone=utc&var-test=${__value.text}
its a link to itself, and i just added the &var-test to populate with the value that you click on, luckily if you link a panel to itself, it wont refresh the whole page when you click on it, it only refreshes the variables that are changed
Hello Sir,
Apologies for responding late. Let me try your way and respond back.
Can you please elaborate your steps one by one, I want to implement this method.
step 1, create a variable, the value does not matter, as we will be replacing it with the value of the pie slice we click on:
step 2, create some dummy data to play with:
this can also obviously be real data…
step 3, create a data link override, i used fields with type number, to grab all 4 slices of the pie, but you can be selective here as well:
and just to test it, i added another text panel, change the type to html, and display the variable ${test}
now when you click on each slice of the pie, the value in the text box will change to match the value of the slice you are clicking on…
1 Like