Answered: Reload chart datastore
Using Beta 2.1 with charts.
I'm using a simple data store that generates random data. I would like to refresh my line chart with this data, but so far had no success in this. I have tried:
But nothing happens on my chart at all. However, this is working:
Great, so I can remove all the data from the chart. But how can I load it again and refresh the chart?
Posted by scottd
Try adding something like this inside your store definition:
refresh : function()
// Generate a fresh set of random values for display on the chart
var newData = generateData(5,1);
// Update this store's data field, which will cause a chart refresh
Then hook up a UI button to call this refresh method:
var store = Ext.getStore('myStore');