jQWidgets Forums
jQuery UI Widgets › Forums › Chart › Uncaught RangeError: Maximum call stack size exceeded
Tagged: jqxchart chart
This topic contains 1 reply, has 2 voices, and was last updated by Hristo 6 years, 2 months ago.
-
Author
-
Hi,
I have a question,
When a show the chart, on the series toggle event, I want to check if is a manual type, if it is I don’t want to show the series in the chart. This is my code:
if(!self.interfaceId.startsWith("D")){ for (let i = 0; i < phpSeries.length; i++) { $chartContainer.jqxChart('hideSerie', i, 0, NaN); } $chartContainer.on('toggle', function (event) { if (event.args){ let eventData = '<div><b>Last Event: </b>' + event.type + '<b>, Serie DataField: </b>' + event.args.serie.dataField + '<b>, Value: </b>' + event.args.elementValue + "</div>"; let channel; let idx; eventData = '<div><b>Last Event: </b>' + event.type + '<b>, Serie DataField: </b>' + event.args.serie.dataField + '<b>, visible: </b>' + event.args.state + "</div>"; for(let i = 0, numChannels = phpChannels.length; i < numChannels; i++){ if(phpChannels[i].nome_breve === event.args.serie.displayText){ channel = phpChannels[i]; idx = i; break; } } if(channel.type === "manual"){ $chartContainer.jqxChart('hideSerie', idx, 0, NaN); } self.createOrRemoveChart(channel,event.args.serie.dataField,event.args.state, self.colors[(event.args.serie.dataField).slice(-1) -1]); console.log(eventData); } }); }
When I press on a series I receive this exception:
jquery-migrate.min.js:2 Uncaught RangeError: Maximum call stack size exceeded at Object.e.event.trigger (jquery-migrate.min.js:2) at HTMLDivElement.<anonymous> (jquery.min.js:3) at Function.each (jquery.min.js:2) at e.fn.init.each (jquery.min.js:2) at e.fn.init.trigger (jquery.min.js:3) at b.(/RW14_Poland/index.php/en/anonymous function)._raiseEvent (http://localhost/RW14_Poland/media/system/jqWidgets/jqx-all.js:7:666997) at b.(/RW14_Poland/index.php/en/anonymous function)._toggleSerie (http://localhost/RW14_Poland/media/system/jqWidgets/jqx-all.js:7:564557) at b.(/RW14_Poland/index.php/en/anonymous function).hideSerie (http://localhost/RW14_Poland/media/system/jqWidgets/jqx-all.js:7:564929) at Object.a.jqx.invoke (jqx-all.js:7)
Why I have this kind of behaviour?
Regards
Hello ae50042,
I tested this example and it seems to work fine: http://jsfiddle.net/b5jLa0d1/
It looks that error appears not from our library.
Could you check it?
I would suggest you try to use the normal “jQuery” library.
Or also, you could miss it because from some of the new versions of the jQWidgets already it is not necessary to include the jQuery.Best Regards,
Hristo HristovjQWidgets team
https://www.jqwidgets.com -
AuthorPosts
You must be logged in to reply to this topic.