Histogram "value/count" from elasitc

I have nginx access.log in elasticsearch with field “http.response.status_code.keyword” set to response status code.
I want to graph histogram “status code” on X and “count of given status code” on Y.
Sample query result:

        "aggregations": {
          "2": {
            "doc_count_error_upper_bound": 0,
            "sum_other_doc_count": 0,
            "buckets": [
              {
                "key": "502",
                "doc_count": 358
              },
              {
                "key": "499",
                "doc_count": 6
              },
              {
                "key": "200",
                "doc_count": 359
              }
            ]
          }
        },

I can’t make Grafana to draw 3 bars, 502,499,200 as Bar labels (on top), 358,6,359 as Bar values (on bottom)

Hello,
Is there an answer for this question yet? I am new to grafana. I am trying to create a similar histogram on an elasticsearch data source using the “histogram” option from the graph plugin.

I have a field with numerical values which I want to use as seperate buckets. (i.e aggregation). My use case is same as the one mentioned above.

Can anyone help me please?
Thanks