# Perspective XY Chart causes javascript endless allocation, race condition?

**URL:** <https://forum.inductiveautomation.com/t/perspective-xy-chart-causes-javascript-endless-allocation-race-condition/23730>\
**Category:** Ignition Early Access\
**Created:** [March 30, 2019, 9:45pm UTC](https://forum.inductiveautomation.com/t/perspective-xy-chart-causes-javascript-endless-allocation-race-condition/23730 "2019-03-30T21:45:55Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![silverbacknet](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/silverbacknet/32/7385_2.png) [@silverbacknet](https://forum.inductiveautomation.com/u/silverbacknet)\
**Post date:** [March 30, 2019, 9:45pm UTC](https://forum.inductiveautomation.com/t/perspective-xy-chart-causes-javascript-endless-allocation-race-condition/23730/1 "2019-03-30T21:45:55Z")

</div>

I have an XY Chart that’s attached to a couple of date pickers, and using them, reads out of the database. There’s a bit of script to convert the data into what I need charted. There’s a total of about 2,000 points on the graph across 8 lines; instant to access, but a little slow to draw.

It all works great the first couple of times a date is picked, but do it too quickly (like move the month ahead and immediately click a different day) and the tab halts while memory starts nonstop increasing (I let it go over 3GB before killing it once), and even Firefox’s “A tab is slowing your browser down” Stop button does nothing to stop the allocation.

I managed to kill the designer that way, too, when I went back and tried to quickly mess with the datepicker. I got a message that a Chromium window had stopped working, my Perspective screens were blacked out, completely blank error popups galore, including while saving a copy of the project (but fortunately, the copy seems to have saved 100% OK).

I can upload a copy of the project and database if necessary.

---

<div class="post-metadata">

**Author:** ![ggross](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/ggross/32/12668_2.png) [@ggross](https://forum.inductiveautomation.com/u/ggross)\
**Post date:** [April 2, 2019, 11:40pm UTC](https://forum.inductiveautomation.com/t/perspective-xy-chart-causes-javascript-endless-allocation-race-condition/23730/2 "2019-04-02T23:40:54Z")

</div>

Hi silverbacknet,

Thank you for reporting this. I have been able to replicate the same type of behavior that you are seeing with the memory increase when data changes in an XYChart. A bug has been filed. We appreciate you helping us find this issue.

Garth

---

<div class="post-metadata">

**Author:** ![will](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/will/32/5037_2.png) [@will](https://forum.inductiveautomation.com/u/will)\
**Post date:** [June 18, 2019, 4:19pm UTC](https://forum.inductiveautomation.com/t/perspective-xy-chart-causes-javascript-endless-allocation-race-condition/23730/3 "2019-06-18T16:19:22Z")

</div>

Did any changes / improvements to these XY memory bugs ever get added into any of the newer nightly builds?

---

<div class="post-metadata">

**Author:** ![dkylep](https://avatars.discourse-cdn.com/v4/letter/d/6de8d8/32.png) [@dkylep](https://forum.inductiveautomation.com/u/dkylep)\
**Post date:** [June 24, 2019, 3:23pm UTC](https://forum.inductiveautomation.com/t/perspective-xy-chart-causes-javascript-endless-allocation-race-condition/23730/4 "2019-06-24T15:23:42Z")

</div>

I’ve been struggling with the XY chart too.  
[[XY Chart help, series disappear](http://forum.inductiveautomation.com/t/xy-chart-help-series-disappear/24900/5?u=dkylep)]

I can only have my perspective view open for a couple minutes before it crashes and the webpage needs to be refreshed.

I really need a resolution to this before we go live.

---

<div class="post-metadata">

**Author:** ![ggross](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/ggross/32/12668_2.png) [@ggross](https://forum.inductiveautomation.com/u/ggross)\
**Post date:** [June 24, 2019, 4:12pm UTC](https://forum.inductiveautomation.com/t/perspective-xy-chart-causes-javascript-endless-allocation-race-condition/23730/5 "2019-06-24T16:12:37Z")

</div>

In investigating this issue, we have determined that it is a bug in the library we are using for charting. This, as well as difficulty in configuring the component, has made us come to the conclusion that replacing the library used for the XY Chart is in everyone’s best interest in the long term. This isn’t a simple change and will take a little bit of time, but it is something we are aggressively working on. We appreciate your patience.

Garth

---

<div class="post-metadata">

**Author:** ![Steve\_Laubach](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/steve_laubach/32/60900_2.png) [@Steve\_Laubach](https://forum.inductiveautomation.com/u/Steve_Laubach)\
**Post date:** [June 24, 2019, 6:29pm UTC](https://forum.inductiveautomation.com/t/perspective-xy-chart-causes-javascript-endless-allocation-race-condition/23730/6 "2019-06-24T18:29:10Z")

</div>

I think you made the right call on this. I’m glad you went this route. Ultimately, we will have a much better control in the long run once it’s done.

It is better to have a good control eventually than a kludgey control quickly.

---

<div class="post-metadata">

**Author:** ![nader.chinichian](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/nader.chinichian/32/9261_2.png) [@nader.chinichian](https://forum.inductiveautomation.com/u/nader.chinichian)\
**Post date:** [February 24, 2021, 9:17am UTC](https://forum.inductiveautomation.com/t/perspective-xy-chart-causes-javascript-endless-allocation-race-condition/23730/7 "2021-02-24T09:17:56Z")

</div>

Any update?

---

<div class="post-metadata">

**Author:** ![Ryan\_Deardorff](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/ryan_deardorff/32/63815_2.png) [@Ryan\_Deardorff](https://forum.inductiveautomation.com/u/Ryan_Deardorff)\
**Post date:** [July 15, 2025, 10:48pm UTC](https://forum.inductiveautomation.com/t/perspective-xy-chart-causes-javascript-endless-allocation-race-condition/23730/8 "2025-07-15T22:48:10Z")

</div>

What is the status of this? My entire project becomes very sluggish after loading a series of XYCharts in a Flex Repeater, and I suspect this could be the reason...

---

<div class="post-metadata">

**Author:** ![nader.chinichian](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/nader.chinichian/32/9261_2.png) [@nader.chinichian](https://forum.inductiveautomation.com/u/nader.chinichian)\
**Post date:** [July 16, 2025, 4:44pm UTC](https://forum.inductiveautomation.com/t/perspective-xy-chart-causes-javascript-endless-allocation-race-condition/23730/9 "2025-07-16T16:44:21Z")

</div>

Check this out. May be this help. I inject up to 100000 point without any lag or problem.

> [@vCortex (i4Cortex Visualization Component Pack)](https://forum.inductiveautomation.com/t/vcortex-i4cortex-visualization-component-pack/100186/30):
>
> Here is a good example of using JavaScript in rentemItem to create complex charting system. This is Time-Correlated Events and Metrics chart which is synchronized the Gantt charts with the line chart in x-axis and all zoom and pan action will effect on both of them. I use rentemItem to create gantt data graphical element. You can find this example in demo project.

---

<div class="post-metadata">

**Author:** ![Ryan\_Deardorff](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/ryan_deardorff/32/63815_2.png) [@Ryan\_Deardorff](https://forum.inductiveautomation.com/u/Ryan_Deardorff)\
**Post date:** [July 17, 2025, 1:52pm UTC](https://forum.inductiveautomation.com/t/perspective-xy-chart-causes-javascript-endless-allocation-race-condition/23730/10 "2025-07-17T13:52:53Z")

</div>

Since my charts were time-based, I decided to switch to the TimeSeriesChart. The difference is amazing. Lightening quick rendering compared to the XYChart, and no adverse effect on project performance.
