4

I want to hide some panel by specific condition in graphana. For instance, I have some variable in my dashboard and I want to change visibility of some graph if my variable is equal to some specific value. Is there any way to do this?

UPD: Using repeat panel option is not solution in my case, because this option just dynamically creates new panels. But I want to hide some panel by specific value of my variable, if variable is not equal to this value then the panel should not be hidden.

grolegor
  • 1,260
  • 1
  • 16
  • 22
  • 1
    Possible duplicate of [Hide grafana panels based on selected template variable](https://stackoverflow.com/questions/39257014/hide-grafana-panels-based-on-selected-template-variable) – Gal S Nov 28 '18 at 12:31
  • here is the same question ... without answer https://stackoverflow.com/questions/59808424/grafana-dashboard-show-hide-row-based-on-variable-value Seems like there is no such option in grafana and never will be :( – dimcha Nov 12 '20 at 21:29

1 Answers1

2

I dont see an option to hide/show a panel with template variable, but instead you can create two dashboards and use dashboard links.

For example:

First Dashboard (Type A) Second Dashboard (Type B)

Create a Dashboard link "Type B" in First Dashboard pointing to second Dashboard. Similarly Create a Dashboard link "Type A" in Second Dashboard and point it to First dashboard.

Settings -> Link -> New Link -> Choose "Include time range" & "Include template variable value"

New Dashboard Link

I have actually used this option because mine was just two variables so it was duplicating the dashboard to two and linking eachother.

enter image description here

If it is multiple values to show/hide, i recommend to achieve it via repeat options some how linking that variable in your query.