# Visualization doesn't follow time picker vlues in the dashboard

**URL:** https://discuss.elastic.co/t/visualization-doesnt-follow-time-picker-vlues-in-the-dashboard/256560
**Category:** Kibana
**Created:** [November 24, 2020, 7:05pm UTC](https://discuss.elastic.co/t/visualization-doesnt-follow-time-picker-vlues-in-the-dashboard/256560 "2020-11-24T19:05:11Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![Agenobarb](https://avatars.discourse-cdn.com/v4/letter/a/b5a626/32.png) [@Agenobarb](https://discuss.elastic.co/u/Agenobarb)
#### Post date: [November 24, 2020, 7:05pm UTC](https://discuss.elastic.co/t/visualization-doesnt-follow-time-picker-vlues-in-the-dashboard/256560/1 "2020-11-24T19:05:11Z")

</div>

Time-based visualization (Line type) doesn't follow the time picker values in the dashboard - regardless what time interval I select in the time picker has no impact on the visualization. Please take a look at the screenshot. Interestingly enough, that Timelion visualization adjusts according to time picker values.  
Any ideas please how to fix this?

 ![image](https://us1.discourse-cdn.com/elastic/original/3X/5/9/59442e1d8f2c92bb2d0081bf300547fee6a748c7.png)

---

<div class="post-metadata">

### Author: ![wylie](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/wylie/32/81794_2.png) [@wylie](https://discuss.elastic.co/u/wylie)
#### Post date: [November 24, 2020, 7:20pm UTC](https://discuss.elastic.co/t/visualization-doesnt-follow-time-picker-vlues-in-the-dashboard/256560/2 "2020-11-24T19:20:27Z")

</div>

There are two possible reasons for this using the "line chart" visualization. Both issues can be resolved by switching to a different visualization type, either Lens or TSVB.

a. The index pattern that you are visualizing is missing a primary time field  
b. The primary time field on the index pattern is not the same time field that you are visualizing

For the "line chart" visualization it's recommended to use the primary time field. For other visualizations you can use any time field.

---

<div class="post-metadata">

### Author: ![Agenobarb](https://avatars.discourse-cdn.com/v4/letter/a/b5a626/32.png) [@Agenobarb](https://discuss.elastic.co/u/Agenobarb)
#### Post date: [November 25, 2020, 7:34am UTC](https://discuss.elastic.co/t/visualization-doesnt-follow-time-picker-vlues-in-the-dashboard/256560/3 "2020-11-25T07:34:45Z")

</div>

Thanks! I have only one time field (which I use for date histogram in the chart). Looking at the index fields, I see it has date data type.  
Is there a way to make it 'primary' as you mention in option 'a'?

---

<div class="post-metadata">

### Author: ![wylie](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/wylie/32/81794_2.png) [@wylie](https://discuss.elastic.co/u/wylie)
#### Post date: [November 25, 2020, 3:53pm UTC](https://discuss.elastic.co/t/visualization-doesnt-follow-time-picker-vlues-in-the-dashboard/256560/4 "2020-11-25T15:53:41Z")

</div>

You can tell it has a primary time field if it has this indication in the UI:

 ![Screen Shot 2020-11-25 at 10.33.02 AM](https://us1.discourse-cdn.com/elastic/original/3X/a/8/a862190bf58dce9a2c3ed2f3f9aad932d88ce5ac.png)

There are basically two options for updating this property of the index pattern:

1. If there is nothing in the index pattern that is customized, such as field formats or scripted fields, you can delete and create a new index pattern **with the same ID**. You are allowed to set the ID of the index pattern manually during creation, so you would follow the steps 1. Copy the ID of the existing pattern 2. Delete 3. Create a new index with the same name and ID, and assign a primary time field

2. You can do the same thing above using the [Kibana saved object APIs](https://www.elastic.co/guide/en/kibana/current/saved-objects-api.html). You can copy+paste the JSON, and then assign the `timeFieldName` property.

---

<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 23, 2020, 3:53pm UTC](https://discuss.elastic.co/t/visualization-doesnt-follow-time-picker-vlues-in-the-dashboard/256560/5 "2020-12-23T15:53:50Z")

</div>

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