-
candle stick char
hello,
i have a problem in candlestick chart example that i want to add on runtime more values to be displayed on the chart
i tried to add values to the chart store but it can not be displayed,the chart still as what is displayed on the first display.
this is what i did
Ext.getStore('Apple').add({date:1340953200000,open: 570.96,high: 587.89,low: 570.37,close: 585.78,volume:15729000,adjClose: 585.78});
also i tried to load the store and redraw the chart
Ext.getStore('Apple').load();
Ext.getCmp('mainChart').redraw();
but nothing happened
Ext.getStore('Apple').load();
Ext.getCmp('mainChart').redraw();
please help
-
Is the record there after you add?
console.log(store.getCount());
store.add(....
console.log(store.getCount());
If you call load, you are reloading old dataset.
Scott.
-
yes the record added successfully ,i am running
console.log(store.getCount());
after every addition but the chart never display any change
i removed store.load and also the same result
-
What SDK are you using? Touch1, Touch2? You have several dupe posts, so it is unclear.
Scott.
-
i am using touch 2,, trying to edit in the stockapp example to add values to chart on the runtime
-
-
i am evaluating sencha to use it in very big financial app,,and i need response ASAP
-
Adding a record to the store should be working fine. You may need to create a small test case so we can have a look.
Scott.
-
this is the launch function in app.js file of the stockapp eample
launch: function () {
// Initialize the main view
Ext.Viewport.add(Ext.create('StockApp.view.Main'));
var datevar=1340953200000;
var someFunction = function() {
var task = Ext.create('Ext.util.DelayedTask', function() {
console.log("count"+Ext.getStore('Apple').getCount( ));
var data=[];
Ext.getStore('Apple').add({date:1340953200000,open: 570.96,high: 587.89,low: 570.37,close: 585.78,volume:15729000,adjClose: 585.78});
datevar=datevar+86400000;
Ext.getStore('Apple').add({date:datevar,open: 583.4, high:590, low:583.1, close:587.41,volume: 12896200,adjClose: 587.41});
datevar=datevar+86400000;
Ext.getStore('Apple').add({date:datevar,open: 583.4, high:590, low:583.1, close:587.41,volume: 12896200,adjClose: 587.41});
datevar=datevar+86400000;
Ext.getStore('Apple').add({date:datevar,open: 583.4, high:590, low:583.1, close:587.41,volume: 12896200,adjClose: 587.41});
datevar=datevar+86400000;
Ext.getStore('Apple').add({date:datevar,open: 583.4, high:590, low:583.1, close:587.41,volume: 12896200,adjClose: 587.41});
datevar=datevar+86400000;
Ext.getStore('Apple').add({date:datevar,open: 583.4, high:590, low:583.1, close:587.41,volume: 12896200,adjClose: 587.41});
datevar=datevar+86400000;
Ext.getStore('Apple').add({date:datevar,open: 583.4, high:590, low:583.1, close:587.41,volume: 12896200,adjClose: 587.41});
datevar=datevar+259200000;
//Ext.getCmp('StockAppMain').draw();
someFunction.call(this);
}, this);
task.delay(1000);
};
someFunction();
}
i created DelayedTask to add records to the store to be displayed