Repository navigation
Automatically generate ranges for range/histogram agg #3757
Description
Activity
I mentioned the range agg, but now I think these enhancements might as well (possibly better) fit the histogram agg.
- changed the title
[-]Automatically generate ranges for range agg[/-][+]Automatically generate ranges for range/histogram agg[/+]on Dec 10, 2015 +1 With the field stats api, we could quickly get the min and max values for a field as the first query to help build out the ranges automatically before sending the query in.
For reference, here is the ES enhancement ticket: elastic/elasticsearch#9572
- addedFeature:VisualizationsGeneric visualization features (in case no more specific feature label is available)Generic visualization features (in case no more specific feature label is available)
on Aug 8, 2018 - addedTeam:VisualizationsTeam label for Lens, elastic-charts, Graph, legacy editors (TSVB, Visualize, Timelion) t//Team label for Lens, elastic-charts, Graph, legacy editors (TSVB, Visualize, Timelion) t//
on Sep 16, 2018 Just adding that occasionally, the binning is not determined based on fixed interval of the independent variable, but on quantiles. An often used quantile is the quartile, eg. showing IQR (interquartile ranges. Boxplots usually derive from IQR values and by extension, their continuous adaptation, bandlines too.
Ticket #3905 is also related.
There are also histogram types where it's not the "height" but the "width" that varies, ie. widths are determined in line with probabilities, a way of showing quantile data.
Sticking to the plain variety of histograms, some method is often used to automatically determine the histogram bin count based on a calculation, eg. the Sturges' formula.
+1 on @monfera's point being able to generate the X-axis bucketing automatically by percentiles of a value. The percentile distribution type of histogram is how most changes and AB tests are evaluated for me these days. For these use cases we have to make use of Tableau today.
We don't automatically generate ranges for the
rangeaggregation in Kibana, but we did start doing it for thehistogramaggregation in 7.10: #76001. It's not quite as fully-featured as the ideas originally mentioned in this issue, but I think it covers the most common case where you just want evenly spaced intervals.- addedimpact:lowAddressing this issue will have a low level of impact on the quality/strength of our product.Addressing this issue will have a low level of impact on the quality/strength of our product.
on Feb 7, 2024 - added a commit that references this issue
on Aug 13, 2024 - added a commit that references this issue
on Aug 13, 2024 - removedFeature:VisualizationsGeneric visualization features (in case no more specific feature label is available)Generic visualization features (in case no more specific feature label is available)
on Jul 21, 2026
In some cases it would be very useful to have Kibana generate the ranges used for the range agg with simple rules, for example:
The second example is especially useful to plot a distribution of latencies with a long tail.