How to ignore empty values on Bar Chart (displaying percentage)


Is there a way to ignore empty values, such that Kibana don't display the Bars (highlighted) for empty values in the screen shot below?

Actually, if on the left I select 'normal' instead of 'percentage', it gives me the desired result i.e plotting only a single bar where some of the values are 'Y', while ignoring the empty values altogether. However as I select 'percentage' it shows me bars for values that dont exists (I think it just divides the bar evenly among all expected fields).

I will appreciate any help in addressing this issue


You can change the min_doc_count of the field to greater than zero: in JSON input under advanced in visualization editor.

That should make sure that Kibana will ignore the empty values.


Should I put the following similar JSON script in Advances Json input? Actually I tried and it dosent show any difference, would you also share an example Json ?

    "aggs" : {
        "tags" : {
            "terms" : {
                "field" : "tags",
                "min_doc_count": 10


Here you go: I ingested logs data from load data into Kibana tutorial(, created an area chart on count on y-axis and terms on x-axis and gave this value in advanced json: {"min_doc_count":1437}. This basically made the area chart ignore document documents with machine.os as osx.

Without the min_doc_count:

Hope this helps.


Thanks, but I am getting following error, is it supported for 'Filters' ? I am using Filters, where each field has to be considered if its value is 'Y':

Visualize: [parsing_exception] Unknown key for a VALUE_NUMBER in [3]: [min_doc_count]., with { line=1 & col=1437 }

 Less Info
Error: [parsing_exception] Unknown key for a VALUE_NUMBER in [3]: [min_doc_count]., with { line=1 & col=1437 }
    at respond (
    at checkRespForFailure (
    at processQueue (
    at Scope.$digest (
    at Scope.$apply (
    at done (
    at completeRequest (
    at XMLHttpRequest.xhr.onload (

ah I don't think so. I am tagging our viz team to see if they have an answer.



min_doc_count does not exist on the Filters aggregation and thus cannot be used in this place. I think you are running an older version of Kibana? The wrong behavior of 0 in percentage charts has been fixed via for 6.3.0. Upgrading to 6.3 (or better 6.4) will solve that issue.


Thanks for the clarification, it make sense now.

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.