PDA

View Full Version : Appending a Store instead of Updating/Overwriting It



OpsTelServices
28 Aug 2012, 10:40 AM
Currently, we have an xml source that is updated every 10 seconds from a piece of technology. This file contains only real-time data when it updates, so more like a snapshot in time. Experimenting with the "Live Updates Chart", how would I go about appending the current store so I can show a trend instead of showing just the snapshot. Below is the code that updates the store:


var store = Ext.data.StoreManager.lookup('chartStore');
store.load();

vietits
28 Aug 2012, 4:38 PM
Try this:


store.load({
addRecords: true
});

OpsTelServices
28 Aug 2012, 8:13 PM
That did the trick! Thanks a bunch.