# Chart Data Not Available in Time Windows of Two Hours or Less?

**URL:** <https://discuss.elastic.co/t/chart-data-not-available-in-time-windows-of-two-hours-or-less/255450>\
**Category:** Kibana\
**Tags:** lens\
**Created:** [November 15, 2020, 9:21pm UTC](https://discuss.elastic.co/t/chart-data-not-available-in-time-windows-of-two-hours-or-less/255450 "2020-11-15T21:21:00Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![astorm](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/astorm/32/79029_2.png) [@astorm](https://discuss.elastic.co/u/astorm)\
**Post date:** [November 15, 2020, 9:21pm UTC](https://discuss.elastic.co/t/chart-data-not-available-in-time-windows-of-two-hours-or-less/255450/1 "2020-11-15T21:21:00Z")

</div>

I'm relatively new to Elastic Search and Kibaba, so I'm unsure if this is user error or a bug. The short version is my chart data does not show up with time windows less than three hours

- I'm using Elastic Cloud.
- I've upgraded to 7.10.
- I have a Lens chart whose data will show when I set the time window to the last three hours.
- However, if I change the time window to show data in the last two hours, NO data shows up
- My timefield is a field named `timestamp` whose type is date and is stored as milliseconds since the epoch

Here's my chart with a "Last Three Hours" window set

 ![Screen Shot 2020-11-15 at 1.09.50 PM](https://us1.discourse-cdn.com/elastic/original/3X/2/3/23ecce54d701ab2cb5143b96ceb5e3e533e10225.png)

Data appears to show up for the times 18:30 - 21:00

However, if I change that time window to "Last Two Hours", I see _no_ data, even though this time window (19:15 - 21:00) is within the previous window.

 ![Screen Shot 2020-11-15 at 1.10.17 PM](https://us1.discourse-cdn.com/elastic/original/3X/e/4/e4e5e92652a38bd87d5fa33a3634ddae4c8e5307.png)

Is this a bug, or is there some subtle (or obvious?) nuance to the handling of time/indexes/data/etc that I'm missing?

---

<div class="post-metadata">

**Author:** ![astorm](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/astorm/32/79029_2.png) [@astorm](https://discuss.elastic.co/u/astorm)\
**Post date:** [November 18, 2020, 4:26pm UTC](https://discuss.elastic.co/t/chart-data-not-available-in-time-windows-of-two-hours-or-less/255450/2 "2020-11-18T16:26:10Z")

</div>

~~I'm still not sure if this is a bug or not, but I think I found the cause for the missing data.~~

I was able to solve this after a quick chat with some of the engineers on the team.

The problem was I was trying to graph some times series data where I was collecting _once entry every five minutes_. If I changed my data collection to once a minute, I was able to successfully get chart lines for times more recent than three hours ago. I was told that the problem was with a sparse dataset the buckets are too small which cause gaps in the charts (and those "gaps" in a line chart mean no data)

There's a few ways to fix this without collecting data more frequently.

The first is to set a minimum interval on the chart.

 ![Screen Shot 2020-11-18 at 10.12.37 AM](https://us1.discourse-cdn.com/elastic/original/3X/0/9/096baf518cf2be935674568d198e73558806ed2d.png)

The second is configure how your chart behaves when there's missing data. Lens can fill those gaps in a way that makes sense for your use case.

 ![Screen Shot 2020-11-18 at 10.21.55 AM](https://us1.discourse-cdn.com/elastic/original/3X/6/8/68ead11231d9b848465b479a4376e6530f152d50.png)

---

<div class="post-metadata">

**Author:** ![matw](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/matw/32/13913_2.png) [@matw](https://discuss.elastic.co/u/matw)\
**Post date:** [November 20, 2020, 4:44am UTC](https://discuss.elastic.co/t/chart-data-not-available-in-time-windows-of-two-hours-or-less/255450/3 "2020-11-20T04:44:55Z")

</div>

Hi

Thx for sharing your solution!

Best,  
Matthias

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [December 18, 2020, 4:45am UTC](https://discuss.elastic.co/t/chart-data-not-available-in-time-windows-of-two-hours-or-less/255450/4 "2020-12-18T04:45:13Z")

</div>

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