Create a piechart based on values

Hi

I have a document with the number of items in stock used and unused

{total: 50, used: 38, unused: 12}

How can i create a pie chart to display as the total, 50, and split it in used and unused?

I have been able to split the chart, but it creates an inner donut, rather than splitting the main one in different slices

Thanks

Hi @javidr ,

Could you show your index mapping results?

GET your-index/_mapping

{
  "items": {
    "mappings": {
      "properties": {
        "date": {
          "type": "date",
          "format": "yyyy/MM/dd HH:mm:ss||yyyy/MM/dd||epoch_millis"
        },
        "total": {
          "type": "long"
        },
        "unused": {
          "type": "long"
        },
        "used": {
          "type": "long"
        }
      }
    }
  }
}