# Update filter when changing index pattern

**URL:** <https://discuss.elastic.co/t/update-filter-when-changing-index-pattern/278103>\
**Category:** Kibana\
**Tags:** kibana-plugin-development\
**Created:** [July 7, 2021, 6:05pm UTC](https://discuss.elastic.co/t/update-filter-when-changing-index-pattern/278103 "2021-07-07T18:05:53Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![xolob](https://avatars.discourse-cdn.com/v4/letter/x/8baadc/32.png) [@xolob](https://discuss.elastic.co/u/xolob)\
**Post date:** [July 7, 2021, 6:05pm UTC](https://discuss.elastic.co/t/update-filter-when-changing-index-pattern/278103/1 "2021-07-07T18:05:53Z")

</div>

Hi everyone,

i'm working on a kibana plugin (Kibana 7.10.3) wich should display data in a chart for a selected index pattern. In the line chart, a selection of the available indices is displayed at the beginning. In principle I would like to copy this functionality - with the difference that an index is to be selected over a dropdown menu in the option tab of a chart. Subsequently, the chart + filter in the top navigation for the selected index should be updated. How can i do that?

I looked at several examples and the visualization plugins. I found out that after the index selection in the line chart, there is a navigation to a URL. This URL contains the index id. But how do I link my plugin to an index?

During the research I came across the saved objects. However, I unfortunately do not understand how these work and are set. I am grateful for any tip!

Best regards!

---

<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 4, 2021, 6:05pm UTC](https://discuss.elastic.co/t/update-filter-when-changing-index-pattern/278103/2 "2021-08-04T18:05:55Z")

</div>

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