-
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
Heatmap visualization does not show empty buckets with date histogram #100301
Comments
Pinging @elastic/kibana-app (Team:KibanaApp) |
It's hard to fix this in a nice way because with the given agg config there are no |
@markov00 Do you think it would make sense to fix this in the visualization itself (elastic-charts in this case)? Basically allowing a non-categorical axis for the y axis in heatmaps and passing in the interval and the chart fills in the missing rows even if they don't have data. |
@flash1293 we can implement that in chart, we already did it for date_histogram. |
@markov00 This doesn't help because of the way we build the table based on the data. An empty bucket in the histogram looks like this:
The empty "buckets" is where the date histogram buckets would go, but Elasticsearch isn't sending them to us (because the histogram bucket is empty) so we can't turn it into rows of the table. We could change the nesting and do the date histogram first, then the histogram agg as a sub aggregation, but this doesn't catch all cases because it still requires at least one date histogram bucket to have data for the histogram bucket left and right from the empty one like this:
If there's no date bucket which has data for some histogram bucket lower and higher than the empty histogram bucket (in this case 13), it won't show up in the result. In summary it's difficult to fix this on the table building / querying side as well and IMHO this looks more like a visualization concern than a data querying concern to me. The histogram case should be much easier than the date histogram case because the buckets are always uniform (no DST and calendar interval complexity) and the first data point will be enough to calculate the others. |
@flash1293 I'm pretty sure you can build your query and use It works on both the histogram and date_histogram aggs and returns all the NxM buckets requested.
or reversing the aggs
The main drawback is that you need to specify the Having the full matrix from Elasticsearch IMHO is more reliable and represents a 1-1 copy of the ES returned data with no postprocessing in the middle: we render what we receive. We are happier if we can get always that dense dataset instead of empty ones also for timeseries and other histogram related charts, but I can see how sometimes this can influence response payload |
Automated extended bounds is a great idea, I didn't think about that. I'm going to check how it could be implemented. |
@flash1293 another case of this is histogram on the x-axis. I guess it can also be solved with automated extended bounds (?) |
Blocked by #119474 - we are working on handling this much more consistently |
Kibana version:
master
Browser version:
Firefox 88.0.1
Original install method (e.g. download page, yum, from source, etc.):
from source
Describe the bug:
The Heatmap visualization does not show empty buckets from the y-axis when a date histogram is defined on the x-axis. Originally reported in Discuss.
Steps to reproduce:
day_of_week_i
field and enable "Show empty buckets".Expected behavior:
I would expect empty buckets on the y-axis to appear when "Show empty buckets" is on and a date histogram is on the x-axis. The elasticsearch response includes the empty buckets, but they are not shown in the visualization.
Screenshots (if relevant):
heatmap-bug.mp4
The text was updated successfully, but these errors were encountered: