-
Notifications
You must be signed in to change notification settings - Fork 8.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Count aggregation should show zero's in line chart #6245
Comments
Hi! Totally new to to the community, is there currently a workaround to show null at 0? |
Welcome @pybern! Did you try setting the |
Thanks for the warm welcome @spalger! I did. On the wrong bucket. It is working now that I have added the setting to the correct bucket. Thanks btw! Hope to learn more and contribute when I can =D |
The problem is min_doc_count works for count, but not for average |
@ivanandrianto95 can you provide an example, and what you expect it to look like? |
When |
@ivanandrianto95 Based on my read of @spalger's original post, that's the intended behavior of the average metric. He said:
Showing missing values as 0 in the context of the average metric could be misleading, because it implies that actual values exist and their average is 0. If you want this behavior though, I think you might be able to accomplish it with the "missing" parameter: https://www.elastic.co/guide/en/elasticsearch/reference/current/search-aggregations-bucket-terms-aggregation.html#_missing_value_12 Set both |
what should the solution for this one be ? if i understand correctly everything can be achieved with additional json input. should { "min_doc_count": 0 } be in command by default if count metrics is selected ? |
@ppisljar my initial thought was to add |
The default ES returns intuitively correct responses:
Kibana handles these responses correctly. Which means that the visualizations look correct as well. This 'could' be fixed for Kibana 4.1 (which uses pre 2.0 ES), but not sure if this issue is worth backporting. => closing. |
We have talked about this a few times, but I don't think we've every agreed to do something different for the count metric agg. I think we should.
Consider this vis:
I seem to recall that we decided not to zero-fill line charts because they are designed to show the path values take, and null/undefined is not the same thing as zero. That's not true when it comes to the "count" metric though. Unless we specify a
"min_doc_count": 0
on bucket aggregations we don't get the bucket count for buckets that don't exist because they would be empty, meaning it's impossible to get a count of zero, which is a totally legitimate thing.This is actually what that chart should look like:
The text was updated successfully, but these errors were encountered: