Sorting on Visual

Need to sort on visual By field called "Category". So i click the filter and add below code.

{
  "sorts": [
    {
      "field": "Category",
      "direction": "ASC"
    }
  ]
}

But i didnt sort by "Catagory". Can someone please tell me how to do sorting?

It'd be handy if you could share the mapping of the field, and some screenshots of what you are seeing.

Basically what i need to do is implementing filter by Kibana Query DSL command to sort a Pie chart by "Category".

We need to see what you are trying please.