I used ElasticSearch as a data source in Grafana 9 and set the metric to “Raw Data” mode, then selected some fields using “Organize Fields Transform” and hid the rest. I also placed the visualization on the “time series”. Now I want to define a variable for the fields that are placed in the legend and the user can use this variable and select any field he likes so that only it is displayed in the graph. But I don’t know how to do this
I tried to put the variable in the "Field with Name" override section and then use the "hide in area" feature. But i can't put ${query} in "Field with Name".