# XY Chart problem "cannot read properties of undefined (reading 'dataFields')"

**URL:** <https://forum.inductiveautomation.com/t/xy-chart-problem-cannot-read-properties-of-undefined-reading-datafields/52832>\
**Category:** Ignition\
**Created:** [November 8, 2021, 2:13pm UTC](https://forum.inductiveautomation.com/t/xy-chart-problem-cannot-read-properties-of-undefined-reading-datafields/52832 "2021-11-08T14:13:57Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![l.cullel](https://avatars.discourse-cdn.com/v4/letter/l/85e7bf/32.png) [@l.cullel](https://forum.inductiveautomation.com/u/l.cullel)\
**Post date:** [November 8, 2021, 2:13pm UTC](https://forum.inductiveautomation.com/t/xy-chart-problem-cannot-read-properties-of-undefined-reading-datafields/52832/1 "2021-11-08T14:13:57Z")

</div>

Hi there,

Using 8.1.11 Ignition Version

I have a view that contain a XY Chart.  
There are many Input Parameters on this view and some of which are used to build a dynamic path.  
To make my XY Chart dynamic, I’ve created a custom property (array) on it wich contain lists with 3 parameters (aggregate, path and alias)

![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/5/5/5540d906ab02f986f27d489095b1bf4af5ed9c1a.png)

The “data” of the XY Chart is bound to my key.

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

My problem is :

When I open the view on my session or on my designer, this error appear

 ![IMG_20211102_135032](https://us1.discourse-cdn.com/inductiveautomation/original/3X/b/7/b75f3e866865886b7fa24f8df44199a9ca9b373d.jpeg)

I just have to refresh the view to make it works.  
Something weird, when i disable the “path” binding on my custom, it works perfectly.

I tried to script a refreshBinding on View Startup part that after 1 second refresh the “path” property : not working  
I tried to script a refreshBinding on a button to refresh the “path” property : not working  
I tried to pass the entire “key” parameter to the view and chart’s data are bind on it : not working

Do you know what’s wrong ?  
Am I missing something?

Many thanks,  
Have a good day 🙂

---

<div class="post-metadata">

**Author:** ![betti.francesco](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/betti.francesco/32/6309_2.png) [@betti.francesco](https://forum.inductiveautomation.com/u/betti.francesco)\
**Post date:** [January 12, 2022, 12:24pm UTC](https://forum.inductiveautomation.com/t/xy-chart-problem-cannot-read-properties-of-undefined-reading-datafields/52832/2 "2022-01-12T12:24:29Z")

</div>

I have a similar problem (version 8.1.5): I have a view with an XYChart, that creates a graph with some history bindings, based on the view params. Then the view is embedded in a tab container inside another view (so the path is static): if I try to switch between the two tabs a couple of times I get the same component error, and disappears if I click on the refresh button (whish refreshes the embedded view params):

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

Seems to be a compoenent bug?

---

<div class="post-metadata">

**Author:** ![lrose](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/lrose/32/62724_2.png) [@lrose](https://forum.inductiveautomation.com/u/lrose)\
**Post date:** [January 12, 2022, 12:33pm UTC](https://forum.inductiveautomation.com/t/xy-chart-problem-cannot-read-properties-of-undefined-reading-datafields/52832/3 "2022-01-12T12:33:34Z")

</div>

There was a bug with this component that may be related to what you are seeing. Looks like it was corrected in 8.1.13.

> [@\[BUG-2363\] XY Chart - Component Error since 8.1.4](https://forum.inductiveautomation.com/t/bug-2363-xy-chart-component-error-since-8-1-4/45394):
>
> Anybody else have issue with XY chart since 8.1.4 I don’t know what the issue is exactly, but when I have an XY chart with a binding with a script for the moment, the chart sometimes display “Component Error” with the detail “Cannot read property ‘dataFields’ of undefined”. Most of the time, F5 fix the issue, but it’s annoying [image]
