What Grafana version and what operating system are you using?
11
What are you trying to achieve?
I want to process a variable before using it as a title of a panel. For instance:
A variable $city has the possible values london, paris, and tokyo.
I want to use $city as a panel title but capitalise the city, so london would be transformed into London, etc.
I don’t want to manually map all of these values and instead want to automatically capitalise all values. I also can’t change the values on the database, so this has to be done in grafana.
Hi, thanks for replying.
The data source is JSON.
This is a simple example to get an answer about how to transform the variable, which I will then apply to my personal use case, so in this case “sao paulo” => “Sao paulo” would be absolutely fine.
Thanks, that looks like a good solution. However it has brought up a different issue - I am using the variable in other places, for instance in my request URLs, and it can’t be capitalised there. I was hoping to transform the variable just on the title of the plot. Do you know if that is possible instead of transforming the value of the variable everywhere on the dashboard?