# XY Chart - Dynamic Series

**URL:** <https://forum.inductiveautomation.com/t/xy-chart-dynamic-series/87326>\
**Category:** Ignition\
**Tags:** perspective\
**Created:** [March 14, 2024, 11:13am UTC](https://forum.inductiveautomation.com/t/xy-chart-dynamic-series/87326 "2024-03-14T11:13:27Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![britocapelo](https://avatars.discourse-cdn.com/v4/letter/b/67e7ee/32.png) [@britocapelo](https://forum.inductiveautomation.com/u/britocapelo)\
**Post date:** [March 14, 2024, 11:13am UTC](https://forum.inductiveautomation.com/t/xy-chart-dynamic-series/87326/1 "2024-03-14T11:13:27Z")

</div>

Hello guys,

I'm using the component XYChart in perspective, I'm getting data from query binding as dataset

 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/f/f/ff9580b7bc36a9a019177c2b7b41e59f0e68849e.png)  
 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/d/1/d1902f4ba91636ef8cff2ade6865870a09a68c98.png)

Is possible to create series dynamically based in the amount of columns, in the dataset? because my columns can go from 3 to 26.

If you guys can point me in the right direction i will appreciate, also I'm no sure if this is the right approach.

thanks.

---

<div class="post-metadata">

**Author:** ![ryan.white](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/ryan.white/32/73193_2.png) [@ryan.white](https://forum.inductiveautomation.com/u/ryan.white)\
**Post date:** [March 18, 2024, 9:22pm UTC](https://forum.inductiveautomation.com/t/xy-chart-dynamic-series/87326/2 "2024-03-18T21:22:18Z")

</div>

You would need to make a project script that will loop through your dataset and then build the series array to apply to the chart. Then you would call this script via a `runscript` call or a script transform on a binding to the series property.

The other way is to install the [Integration Toolkit](https://forum.inductiveautomation.com/t/automation-professionals-integration-toolkit-module/74934) from pturmel and utilize the `forEach()` expression method coupled with the `columnsOf()` method to build the series in an expression binding.
