Kibana single bar spans the entire x-axis

Hi at All,

I would like to know if is it possible to select a bar of a barchartA; applying relative filters, and the size of the chart filtered remains of its original size, and NOT the bar spans the entire x-axis.
For me is much important.
Thank you very much for helping.


Hi @mad-max,

this depends on the aggregation you are using on your x-axis. Could you maybe provide further details or a screenshot/drawing to illustrate the situation?

HI a screenshot/drawing to illustrate the situation:


It looks like you have a Terms bucket aggregation on your x-axis. The effect you are seeing comes from the fact that the x-axis is evenly divided among all terms returned by Elasticsearch. After applying the filter for a term, all other buckets are omitted by default because they are empty. You can tell Elasticsearch to still return the empty buckets by setting {"min_doc_count": 0} in the advanced "JSON input" of the bucket aggregation:


That should lead to Elasticsearch still returning the empty term buckets, which subsequently still take up space on the x-axis.

Hi thanks for the answer with just the bouquet is perfect but i also use the split series and at this point the result is like the image and it is occupied half of the axis x the worse is if i use the stacked bar as the graph after l 'The filter application is empty.

Have you added the min_doc_count setting to the first bucket aggregation as well?

Hi yes i do
now the sceenshot
Immagine0 4-11

what I'm doing wrong?


Hm, your screenshot shows that the second aggregation does not have the min_doc_count setting applied. Try setting it on both aggregations.

HI it's ok.
thank you very much.

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