# Perspective XY Chart crashes with rapid date changes

**URL:** <https://forum.inductiveautomation.com/t/perspective-xy-chart-crashes-with-rapid-date-changes/24787>\
**Category:** Ignition\
**Tags:** perspective\
**Created:** [May 8, 2019, 10:37am UTC](https://forum.inductiveautomation.com/t/perspective-xy-chart-crashes-with-rapid-date-changes/24787 "2019-05-08T10:37:43Z")\
**Posts on this page:** 4\
**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:** [May 8, 2019, 10:37am UTC](https://forum.inductiveautomation.com/t/perspective-xy-chart-crashes-with-rapid-date-changes/24787/1 "2019-05-08T10:37:43Z")

</div>

Further to my question [Bind an XY Chart dataSource to …/Table.props.data](http://forum.inductiveautomation.com/t/bind-an-xy-chart-datasource-to-table-props-data/24749/2) I seem to have narrowed down the problem.

I have a view with

- DateTime Picker
- XY Chart  
The DateTime Picker updates a session variable _endDate_ and the XY Chart binding uses that to extract the data from the Tag History.

It all works if the user waits a couple of seconds between date selections. If s/he clicks a new date very soon (\< 1 s) after the previous one the page locks. Presumably I’m triggering another chart update before the previous one is complete. (Tables don’t seem to exhibit this problem.)

I’m wondering how to handle this. (It seems to be a bug but I need a workaround.) One way - if possible - would be to disable the DateTime Picker with the _onClick_ event and re-enable it when the chart has completed its datasource update. I can’t find a suitable event for this. Is there a way to do it using the _runAction(self, event):_ script?

Update:  
The _Vision_ module has a chart property called _ **propertiesLoading** _ (useful for hourglass pointer, etc.). We seem to be missing its equivalent in Perspective.

Any ideas?

---

<div class="post-metadata">

**Author:** ![pturmel](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/pturmel/32/3295_2.png) [@pturmel](https://forum.inductiveautomation.com/u/pturmel)\
**Post date:** [May 8, 2019, 12:53pm UTC](https://forum.inductiveautomation.com/t/perspective-xy-chart-crashes-with-rapid-date-changes/24787/2 "2019-05-08T12:53:34Z")

</div>

Perspective’s XY Chart is known to have big problems (including a memory leak) and is likely to be replaced entirely. Might want to mitigate with least effort until IA decides what to do.

---

<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:** [May 8, 2019, 1:22pm UTC](https://forum.inductiveautomation.com/t/perspective-xy-chart-crashes-with-rapid-date-changes/24787/3 "2019-05-08T13:22:35Z")

</div>

Thank you for the reply.  
I'm watching Chrome's memory usage in Windows TaskManager but don't see any issue there. I'm able to update a few times before the page locks but I can't quite figure out what's happening.

> [@pturmel](#):
>
> Perspective’s XY Chart is known to have big problems (including a memory leak) and is likely to be replaced entirely.

Can you remember where you read that?

> [@pturmel](#):
>
> Might want to mitigate with least effort ...

Are you aware of any good workarounds? The XY Chart mostly works and there is no alternative as far as I can see.

---

<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:07pm UTC](https://forum.inductiveautomation.com/t/perspective-xy-chart-crashes-with-rapid-date-changes/24787/4 "2019-06-18T16:07:41Z")

</div>

Have there been any recent update to the XY chart memory leak / crashing? Admittedly I haven’t skimmed notes for nightly builds from the last post on this trail to today.

Our clients frequently crash when testing anything using the XY Chart. I thought I could improve functionality by removing bindings and managing updates to datasource data through scripting (so I could rate limit / prevent excessive user date picker changes) but thus far have been pretty unsuccessful. One or two date changes and the client crashes in chrome.

We use it in Historical mode; perhaps the only temporarily fix is to disallow date changes and run static time periods on page load (severely limiting functionality), or maybe run in realtime mode only?
