Plugin: always has the same value


For our Grafana plugin we want to be able to detect the current theme and adjust our color scheme accordingly.

I found the key, but its value is always set to “dark”. If I recall correctly, variableSrv is not part of the public API, so I understand if this is something you won’t fix.

Is there another way of getting the current theme from within a plugin?


You can get it like this: Grafana templating by logged in user

Here is an example from the Bubble Chart plugin: