Date histogram "auto" interval

Hello everyone,

I was looking through the source files on GitHub, trying to find the function that determines the automatic time interval though I could not find it.

I am working on a project, and I would like to have dynamic time intervals (e.g. large range => lower resolution, small range => higher resolution).

Does anyone know where I would be able to locate this function?

Thanks,

Tanner

Ultimately, auto interval calculation happens here: https://github.com/elastic/kibana/blob/master/src/ui/public/time_buckets/calc_auto_interval.js

That module is used by the TimeBuckets class: https://github.com/elastic/kibana/blob/master/src/ui/public/time_buckets/time_buckets.js

And the TimeBuckets class is instanciated for each date_histogram bucket aggregation here: https://github.com/elastic/kibana/blob/master/src/ui/public/agg_types/buckets/date_histogram.js#L56

Hope that helps a little

This is exactly what I was looking for.

Thanks!

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