Grafana - using queried data in legend names

Hi, any chance to use queried data in legend names? E.g.: for the disk usage metrics, a legend could contain device type, path, and host. I remember in old Grafana you could use field and tag names to construct legend names.

If you have tags on your metrics then just use those inside {{}}

So if your storage data is tagged with path and hostname, then you could set your legend to {{hostname}}:{{path}} and you’d end up with a label like myhost:/home or similar

Thanks for the answer, I will check it out now

I was thinking about using the variables in this field (the double curly brace tags, not actual Grafana variables)
but it seems that I have to use rename by regex transformation

I made peace by using this simple regex