# How to modify XY Chart tag history binding based on dropdown selection

**URL:** <https://forum.inductiveautomation.com/t/how-to-modify-xy-chart-tag-history-binding-based-on-dropdown-selection/54213>\
**Category:** Ignition\
**Tags:** perspective\
**Created:** [December 16, 2021, 8:33pm UTC](https://forum.inductiveautomation.com/t/how-to-modify-xy-chart-tag-history-binding-based-on-dropdown-selection/54213 "2021-12-16T20:33:22Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Transistor](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/transistor/32/3380_2.png) [@Transistor](https://forum.inductiveautomation.com/u/Transistor)\
**Post date:** [December 16, 2021, 8:33pm UTC](https://forum.inductiveautomation.com/t/how-to-modify-xy-chart-tag-history-binding-based-on-dropdown-selection/54213/1 "2021-12-16T20:33:22Z")

</div>

Here’s my dropdown (on top) and XY Chart.

 ![XY chart with filter](https://us1.discourse-cdn.com/inductiveautomation/original/3X/0/8/08c5abfa406e2bc33071471fbb43f134a0720971.png)

Here’s my existing (fixed) binding.

 ![Tag history binding expression](https://us1.discourse-cdn.com/inductiveautomation/original/3X/5/f/5ff4d4ef27baf436b839b23a6c8ec04370e2d589.png)

How would I replace the contents of the red box with the option value selected in the dropdown?

---

<div class="post-metadata">

**Author:** ![jespinmartin1](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/jespinmartin1/32/57175_2.png) [@jespinmartin1](https://forum.inductiveautomation.com/u/jespinmartin1)\
**Post date:** [December 16, 2021, 10:22pm UTC](https://forum.inductiveautomation.com/t/how-to-modify-xy-chart-tag-history-binding-based-on-dropdown-selection/54213/2 "2021-12-16T22:22:36Z")

</div>

With Script Transform

---

<div class="post-metadata">

**Author:** ![swolnisty](https://avatars.discourse-cdn.com/v4/letter/s/7bcc69/32.png) [@swolnisty](https://forum.inductiveautomation.com/u/swolnisty)\
**Post date:** [December 16, 2021, 10:26pm UTC](https://forum.inductiveautomation.com/t/how-to-modify-xy-chart-tag-history-binding-based-on-dropdown-selection/54213/3 "2021-12-16T22:26:08Z")

</div>

You should take a look at the [Tag History Bindings](https://docs.inductiveautomation.com/display/DOC81/Tag+History+Bindings+in+Perspective) portion of the user manual. The “Using Dynamic Tag Paths” section gives a good example to get you started. I would just bind a custom property to the dropdown’s value property and use a script transform to build out your tag key properties based on that, append them a list, then reference that custom list property in your tag selection expression on the tag history binding.

Edit (screenshots for clarity):

 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/e/8/e80d5db9e07eabf9f51b9793a9f368fedf7562be.png)

Which should return:

 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/6/8/68474fa2b200ec0b8ef8be473a6e69086aef5512.png)

 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/1/8/18b200ada8148adae485b39f51ca6fb0680983f2.png)
