Give the user the ability to choose the graph to display using a parameter

Hello,

I want to configure Grafana Time Series vizualization to give the user the ability to choose a graph (or graphs) to display (equivalent to filtering column values on tables) on the same panel. Is this possible?
Inputs are elasticsearch logs grouped by timestamp and retreived using many queries.

Grafana version: v8.3.1

Thank you,

Hi @saidtig,

Just have a quick question.

Once if the user login, should there be an existing Time Series Visualisation setup which he can view and then later change it to e.g. Gauge, Histogram visualisation?

OR

No visualisation is defined but get a pop-up box which asks the user what visualisation he wants to select to view the data?

Hi @usmanahmad ,

The user can see an existing visualization. My idea was to define a type of visualization and choose the log parameter to show as a graph. Actually i found a solution by creating queries for each log parameter and then override the display name by queries to let the user choose the graph just by clicking on the legend.

I will make this topic as solved.
Please tell me if there is any other solution more elegant.

Hi @saidtig,

Glad to hear it !! :slight_smile:

This is optional, but we would appreciate it if you could describe your solution in a bit more detail so that all the other community members can view it and solve any similar cases in future.

We want to make our OSS community stronger by the sharing of knowledge !!

Grafana displays the variation of an elasticsearch field value that i identified using the “filter by name” transform under many queries resulting different graphs.

Since Grafana uses the name of that field to display the name of the serie, it is not possible for the user to know which graph corresponds to which query result.

To give the user the ability to choose the graph (query) to display, i had to do for each query (one by one) :
Add field override->Fields with name(choosing the parameter)->Add override property->Standard options>Display name and then give the name that represents the query.

1 Like