Why there're some decimals in kibana when I choose @timestamp per hour?

:grinning:I have an index with about 10,000 csv data which contains timestamp, as I want to see the trend of count in one day, I choose @timestamp per hour in kibana, then I find that decimals appear in the histogram like this:


it makes me very confused, why and how kibana figure out decimal? I think integer is reasonable...:thinking:

nobody ?:joy:

This may seem confusing, but here's what's happening:

You've selected "hourly" as the interval. It looks like your time range is about three weeks, which means that if we were to show a bar for every interval, that'd be about 500 bars! That's too many to show, so behind the scenes we automatically scale the interval to something that doesn't create so many bars. In this case, we select 3 hours. (Notice the "Scaled to 3 hours" text next to the interval?)

Here's where it gets a bit controversial. Since you've selected "Hourly", we assume you really want to see the count per hour, not per 3 hours. So we take the count for that 3-hour period and divide it by 3 to give you the average count per hour in that time range.

There's some discussion that has happened around this, and whether we should just show the count for that 3-hour period instead of showing the average per hour for that 3-hour period.

If you'd like to add to the discussion, feel free to chime in here: https://github.com/elastic/kibana/issues/8618

1 Like

Oh ~I see :grinning::grinning: Thanks sooooo much for your clear explanation~~

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