Hello.
I want to create chart pie using elasticsearch in grafana.
I stored document in elasticsearch as below:
"hits" : [
{
"_index" : "test",
"_type" : "_doc" ,
"_source" : {
"name" : "A" ,
"category" : "card" ,
"count" : "123" ,
"timestamp" : "2022-01-18T23:30:01.315Z"
}
} ,
{
"_index" : "test",
"_type" : "_doc" ,
"_source" : {
"name" : "B" ,
"category" : "card" ,
"count" : "69" ,
"timestamp" : "2022-01-18T23:30:01.315Z"
}
} ,
{
"_index" : "test",
"_type" : "_doc" ,
"_source" : {
"name" : "C" ,
"category" : "card" ,
"count" : "31" ,
"timestamp" : "2022-01-18T23:30:01.315Z"
}
} ,
...
]
Is it possible to create pie chart from all data of “card” category? (Value of “name” field can be changed irregularly.)
I mean that A is 123, B is 69, and C is 31.
Any help would be greatly appreciated.