I’d like to capitalize the first letter of a field display name in Grafana (e.g. “fieldname” → “Fieldname”).
I tried with the “Rename by regex” transformation, using the special regex character
\u, that converts the next character to upper case:
But the special character does not get recognized and the name becomes “\ufieldname”.
I know that I can use overrides to accomplish that, but I would like to know if there’s a more automated way of doing this.
Thanks a lot!
what is your datasource ? could you do it in your query ?
ideally you want transform your data before visualisation part,
if it’s SQL you can use some case and upper fonction i think
I’m using Grafana Live Measurements, so no SQL involved, and no possibility to tweak the query.
I don’t think uppercase conversion is possible like this. AFAIK, the replace part only accepts found capture groups and fix literals.
The only solution I can think of is to create 26 “Rename by regex” transformations, one for each letter:
Tricky but working. Thanks!