Create chart by each category count value (newbie question)

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.

Hello :wave: and welcome to the forum, @xmlsysop

what does your data look like in Grafana when viewed using the table visualization? I would share a screenshot or share some of your raw, unformatted data: