# Date histogram zooming problem

**URL:** <https://discuss.elastic.co/t/date-histogram-zooming-problem/94753>\
**Category:** Kibana\
**Created:** [July 27, 2017, 7:23am UTC](https://discuss.elastic.co/t/date-histogram-zooming-problem/94753 "2017-07-27T07:23:03Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Sylfaen](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/sylfaen/32/17653_2.png) [@Sylfaen](https://discuss.elastic.co/u/Sylfaen)\
**Post date:** [July 27, 2017, 7:23am UTC](https://discuss.elastic.co/t/date-histogram-zooming-problem/94753/1 "2017-07-27T07:23:03Z")

</div>

Hi !

I made a **line chart** with a Date Histogram aggregation but I've got an issue when I'm trying to select a part of my chart.

And when I'm doing this :

 ![](https://us1.discourse-cdn.com/elastic/original/3X/2/5/25ac477ccdfed8b596256f2463995e57132e8c32.png)

I've got :  
 ![](https://us1.discourse-cdn.com/elastic/original/3X/a/9/a9d89d263314f22808b86546752a19241268d917.png)

But my date field is (imo) well defined :

 ![](https://us1.discourse-cdn.com/elastic/original/3X/a/5/a57e3a2f2d2ce74472d4014abc1edd36ca512e2a.png)

Any idea?

Thanks!

---

<div class="post-metadata">

**Author:** ![Sylfaen](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/sylfaen/32/17653_2.png) [@Sylfaen](https://discuss.elastic.co/u/Sylfaen)\
**Post date:** [July 27, 2017, 7:57am UTC](https://discuss.elastic.co/t/date-histogram-zooming-problem/94753/2 "2017-07-27T07:57:01Z")

</div>

I succeed to make it working by changing the time-field name on the index pattern creation.

Before, I was using @timestamp as time-field and now, by selecting date, the chart is working... But it means that we can't make a line chart with a Date Histogram agg with an other time-field ? 😰

---

<div class="post-metadata">

**Author:** ![weltenwort](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/weltenwort/32/53885_2.png) [@weltenwort](https://discuss.elastic.co/u/weltenwort)\
**Post date:** [July 31, 2017, 2:23pm UTC](https://discuss.elastic.co/t/date-histogram-zooming-problem/94753/3 "2017-07-31T14:23:08Z")

</div>

Hi @Sylfaen,

thank you for sharing your solution. Date histogram aggregations can be created on any date field, but right now the horizontal selection always modifies the time field configure for the index pattern. There are some other issues in such situations (e.g. [#5707](https://github.com/elastic/kibana/issues/5707), which are being worked on.

In the meantime I would suggest you try out Timelion or the Time Series Visual Builder to create your graph. They allow for per-graph selection of the time field:

- In Timelion the `timefield` argument to `.es()` specifies the time field as in `.es(index="logstah-vitbfi-fin-rint-*", timefield="date")`.
- In the Time Series Visual builder every panel has its own "Time Field" setting, which can in turn be overriden in the options for each data series.

---

<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:** [August 28, 2017, 2:23pm UTC](https://discuss.elastic.co/t/date-histogram-zooming-problem/94753/4 "2017-08-28T14:23:39Z")

</div>

Closed on August 28, 2017, 2:23pm UTC

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