How to plot influxdb tag values in grafana to display as legend

Hi All,

I’m trying to plot a time series where i have 3 different storage types and the amount of storage used, i currently have the storage type set within tags and then the usage and total available values in fields. When trying to plot i only get the fields show in the legend where i would ideally get the storage type shown in the legend and usage plotted across time.
I’m using Grafana v11.5.1.

Here is a shot of what i currently have in the query and resulting table, is there a way to pivot the name values to columns perhaps?

Grouping by name has allowed me to plot what i want, ideally i’d be able to adjust the text in the legend as it’s now a combination, e.g in_use sirius. Ideally this would be just sirius.

Edit: Rename field by regex worked for the field name as mentioned by @ebabeshko

Where is in use coming from?

It’s a field i have in the InfluxDB

Rather workaround then solution, but did you try playing with transformations?

I.e. something like this:

1 Like

I haven’t, i’m new to Grafana so just getting to grips with it, i’ll have a look at it, thanks.