-
20 Feb 2013 3:18 AM #1
Unanswered: candle stick char
Unanswered: 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
-
21 Feb 2013 5:44 AM #2Sencha - Support Team
- Join Date
- Jul 2010
- Location
- Houston, Tx
- Posts
- 7,185
- Vote Rating
- 194
- Answers
- 433
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.
-
21 Feb 2013 6:08 AM #3
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
-
21 Feb 2013 6:27 AM #4Sencha - Support Team
- Join Date
- Jul 2010
- Location
- Houston, Tx
- Posts
- 7,185
- Vote Rating
- 194
- Answers
- 433
What SDK are you using? Touch1, Touch2? You have several dupe posts, so it is unclear.
Scott.
-
21 Feb 2013 6:33 AM #5
i am using touch 2,, trying to edit in the stockapp example to add values to chart on the runtime
-
24 Feb 2013 11:40 PM #6
-
25 Feb 2013 12:23 AM #7
i am evaluating sencha to use it in very big financial app,,and i need response ASAP
-
25 Feb 2013 5:08 AM #8Sencha - Support Team
- Join Date
- Jul 2010
- Location
- Houston, Tx
- Posts
- 7,185
- Vote Rating
- 194
- Answers
- 433
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.
-
25 Feb 2013 5:48 AM #9
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
Thank you for reporting this bug. We will make it our priority to review this report.


Reply With Quote