# XYChart component as template

**URL:** <https://forum.inductiveautomation.com/t/xychart-component-as-template/88128>\
**Category:** Ignition\
**Tags:** perspective\
**Created:** [March 31, 2024, 6:55pm UTC](https://forum.inductiveautomation.com/t/xychart-component-as-template/88128 "2024-03-31T18:55:37Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Lizzie\_Maldo](https://avatars.discourse-cdn.com/v4/letter/l/d2c977/32.png) [@Lizzie\_Maldo](https://forum.inductiveautomation.com/u/Lizzie_Maldo)\
**Post date:** [March 31, 2024, 6:55pm UTC](https://forum.inductiveautomation.com/t/xychart-component-as-template/88128/1 "2024-03-31T18:55:37Z")

</div>

Hey there, I am new to ignition and currently working with a XYChart component, Im trying to use the XYChart as a template and call it from a flex repeater.  
Why this way ? because the number of bars in the XYChart its not going to be the same always. So according to my data in the flex repeater I want to call the XYChart and to show X number of bars.

So this is how I am trying to do it and something is wrong:  
I have my XYChart component and its working on its own

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

As you can see I have the template and if my schedule\_data is binding to the **view.custom\_schedule\_data** its works fine.

In the template I have the **custom schedule\_data** that works and the **param schedule\_data** which I expect to be filled with the flex repeater

![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/c/d/cdeb9a81fab5dbb088b3c53d2fd1a0d799ed1194.png)

Then, from my view (the one with the flex repeater) I have the following configuration:  
First I have the **custom view\_data** (this one is the array that will be changing,for this example I have Fin Press 1 and Fin Press 2 as the first picture , but it could be more or just one)

I can only put 3 images in the post, but the **custom view\_data** has the same exactly info that the **view.custom.schedule\_data** from my template for this example.

In the flex repeater I have the path to my template and the instances is binding to the **custom view\_data** array and in my template I change the schedule\_data binding to the **view.params.schedule\_data**

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

But here is where it don't show anything.  
Of course I am getting something wrong, I would appreciate the help !!

---

<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:** [April 1, 2024, 6:24pm UTC](https://forum.inductiveautomation.com/t/xychart-component-as-template/88128/2 "2024-04-01T18:24:51Z")

</div>

For your instances in the flex repeater, if you expand each instance in the property viewer, do they contain an property called 'schedule\_data'? If not, then your template is not going to have any of your expected data passed to it.

The properties in each instance defined in the template repeater are passed to the template view as params with their property name as their key. Your template view is looking for a parameter with a key of 'schedule\_data'. If the instance in your template repeater does not have that, it's passed a null.
