My dynamic Line chart crashes the browser

« Back to message list

Enter your email address to get email updates on this topic. You can stop receiving updates by clicking the link in the update email messages.

Posted by Goldy on 12th June 2013
So far uve helped me a lot.
I am using Line Graph and plotting lines dynamically
Whenever a new line is chosen from my checkbox I will submit my form using ajax and get the data back for that line.
I will then plot all those lines on the Line Graph dynamically.

The problem Im facing is, it looks fine initially but then the browser crashes down
or it hangs there
This is a severe error. How do i fix this.
Please ask me more questions if you need to

Posted by RGraph support on 13th June 2013
Hi there,

Sounds like something may be building up - as in you're accumulating data but not getting rid of it when you're done. That example not only continually adds values on to the end of the array - but it also gets rid of data from the start (the array_shift() calls). This prevents the array from growing beyond the initial 300 values.

Richard, RGraph Support
Posted by Goldy on 13th June 2013
No, I am calling the array_shift calls at every call.
So I have an array of Arrays
if there are 3 lines chosen then the MAIN array contains 3 arrays
and I loop through each of those arrays push the value in it and do the array_shift
I tested that in Firebug and I can see the array shifting.
But after sometime it just crashes, or the browser stops responding
I can have more than 15 lines which are dynamically plotted in my graph
But this is failing for more than 1. So is there a problem of plotting the graph in RGraph.Line ?
Posted by RGraph support on 13th June 2013
Hi there,

There's no problem in RGraph - have you tried different browsers?

Richard, RGraph Support
Posted by Goldy on 13th June 2013
Yes I tried in Chrome and in FF.
One thing I observed is, if I let it as its running it works fine.
But the moment I move my mouse over that page, it crashes
Does that mean something to you ?
Is there an example you can provide me, in which i can add more Lines dynamically
say example you give me checkboxes and I will choose and unchoose how many lines I want to show
Is it please possible for you to create such a small example

Thanks a lot
Posted by RGraph support on 13th June 2013
Hi there,

If you wish I can create an example ;like that for you and do it as a "license holders customisation".

Richard, RGraph support
Posted by Goldy on 14th June 2013
Ok no worries,
But does that mean somthing to you. Mouse over my canvas, stops that graph ?

Posted by RGraph support on 14th June 2013
Hi there,

It's only something I've come across during development - and usually points to a runaway mousemove event or a more general infinite loop.

Richard, RGraph Support

Add a reply

« Back to message list