I have the following data on a Elasticsearch datasource:
| environment | deployments | hasLiveness | hasReadiness | date |
|-------------|-------------|-------------|--------------|---------------------|
| foo | 5 | 3 | 3 | 2023-04-05 08:08:34 |
| bar | 1 | 1 | 1 | 2023-04-05 08:08:34 |
| xyz | 2 | 1 | 0 | 2023-04-05 08:08:34 |
I need to show this information in bar chart format, like below:
Using the old graph panel, I used the following three queries and it worked:
A: date:[now-1d TO now]
Metric: sum => deployments
Group by: date histogram => date
B: date:[now-1d TO now]
Metric: sum => hasLiveness
Group by: date histogram => date
C: date:[now-1d TO now]
Metric: sum => hasReadiness
Group by: date histogram => date
I’m trying to use a newer panel since the graph panel is deprecated. I immediately thought of the Bar Chart panel, but it needs a string field. So I figured I need to transform the data somehow, but couldn’t figure out how.
Or is there another panel that could achieve what I want?
I’d appreciate it if you could point me in the right direction.
Thanks in advance!