Dynamic Line chart crashes down

Share RGraph:   To help my Google visibility (it can't get much worse!), if you like and use RGraph I'd appreciate it if you could link to me

« 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
Hi,
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
using this dev.rgraph.net/demos/line-dynamic-updates-range.html for reference

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

Thanks
-Krunal
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

5 developer license with Priority support for £299:
   www.rgraph.net/license#five-developer
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

5 developer license with Priority support for £299:
   www.rgraph.net/license#five-developer
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 ?

Thanks
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

5 developer license with Priority support for £299:
   www.rgraph.net/license#five-developer

Add a reply




« Back to message list