sangltdn / flot

Automatically exported from code.google.com/p/flot
MIT License
0 stars 0 forks source link

Updating graph on ajax #307

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Hey,

I am trying to use flot to plot an ajax line graph. My JSON file will be
updated with a new statistic added on every minute, so I want it to check
for a new statistic every minute and then add it on the end of the existing
graph. It seems to be getting the updates but plotting a new line ontop of
the old one (which is evident as it is a different color) and after a while
this slows down the browser. I could just be doing something wrong ... any
help would be great. Here is my code, which is a modified version of
ajax.html from the example source.

http://pastebin.com/f605bbf65

Original issue reported on code.google.com by raab1...@googlemail.com on 17 Feb 2010 at 8:53

GoogleCodeExporter commented 9 years ago
Hi!

It seems like you're appending a new array to the data array instead of (I 
think the
offending line is 61, if you delete that it might work).

This sort of question is best asked on the forum/mailing list, by the way.

Original comment by olau%iol...@gtempaccount.com on 22 Mar 2010 at 12:10

GoogleCodeExporter commented 9 years ago

Original comment by dnsch...@gmail.com on 4 Jun 2012 at 2:52