0

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".

Hasti
  • 1
  • 1
  • My understanding is that you cannot use variable in transformations and alike. I can imagine what you want only if you specify a list of fields to be selected through variable straight in the query, but I'm not familiar with elastic to say if it is possible this way. – markalex Aug 20 '23 at 13:25
  • Exactly this can be done easily in RDBM data sources by putting variables in the query, but I don't know how to do it in this particular panel with elastic search data sources. – Hasti Aug 20 '23 at 13:38

0 Answers0