JSON Input Query

How to use JSON input query on Y-axis for Count aggregation?

I have field named "success" value having values "Ture/False".. where in want to show the count of only "success=true"

Put { "script" : "doc['success'].value=TRUE" } json input but its not working as desired.

You probably either want to filter on success:true in the search bar or use the Filter Aggregation, depending on what you're doing.