Updating dataSet with flot resets data

I've got a flot chart that I want to dynamically update via AJAX.

I can render the chart initially, but whenever I try to update the dataSet and redraw the chart, it resets all my data points:

plot.setData(dataSet);
        plot.draw();

I have tried this with several different array setups, and it seems like I am passing it the right data—the chart just doesn't take.

Anyone have any ideas? Thanks!

http://datasift.islsandbox.com/

This example uses WebSockets, so a WebKit browser is your best bet for testing.

7
задан Jon 25 April 2011 в 16:42
поделиться