# Error: Maximum Call Stack Size Exceeded When Plotting XY Chart

**URL:** <https://forum.inductiveautomation.com/t/error-maximum-call-stack-size-exceeded-when-plotting-xy-chart/101478>\
**Category:** Ignition\
**Tags:** perspective\
**Created:** [January 28, 2025, 9:58am UTC](https://forum.inductiveautomation.com/t/error-maximum-call-stack-size-exceeded-when-plotting-xy-chart/101478 "2025-01-28T09:58:15Z")\
**Posts on this page:** 1\
**Showing post:** 4

<div class="post-metadata">

**Author:** ![MG3](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/mg3/32/84125_2.png) [@MG3](https://forum.inductiveautomation.com/u/MG3)\
**Post date:** [January 28, 2025, 10:52am UTC](https://forum.inductiveautomation.com/t/error-maximum-call-stack-size-exceeded-when-plotting-xy-chart/101478/4 "2025-01-28T10:52:55Z")

</div>

Okay! From what limited information I know about JavaScript, this error occurs when there are too many nested function calls, causing the stack to exceed the limits.

Try using a LIMIT in your SQL statement (just in case more data is being returned than you thought). Also, someone has previously had this issue and fixed it by:

> [@\[XY Chart\] Maximum call stack size exceeded](https://forum.inductiveautomation.com/t/xy-chart-maximum-call-stack-size-exceeded/75696/2):
>
> only return the events every 5 min, considering that each entry will represent the average data for the last 5 minute

or

> [@\[XY Chart\] Maximum call stack size exceeded](https://forum.inductiveautomation.com/t/xy-chart-maximum-call-stack-size-exceeded/75696/2):
>
> or only keep in "decadrages" table the events which correspond to a minute when something happens on an other table called "headtem

Hopefully there is a solution in here that will work for you! If not then I'd recommend waiting for someone from IA to reply back with their thoughts.

---

_[View the full topic](https://forum.inductiveautomation.com/t/error-maximum-call-stack-size-exceeded-when-plotting-xy-chart/101478)._
