PDA

View Full Version : Chart auto update issue



chrilsluke881221
10 May 2012, 9:18 PM
Hi everyone,

I am a rookie for extjs and i want to display a live data on the chart . the first problem is about auto updating the chart, i use var live= {
run: function(){

liveCharts[liveCharts.length] = newChart;

interval:2000
}

Ext.TaskMgr.start(live);

it works fine but its hardcoded, i want to let the interval be chosen by the refresh options(every 5, 10 seconds). any way around it? how can i pass a variable ,say '5 second' option , to the value of interval then make it auto update every 5 seconds instead of hardcoding.


second problem is , the code above is working (but its hardcoded), the chart can display live data but all the data will be displayed ,making the line or column or others chart look like being squeezed and shrinking as the data keeps coming in. how can i resolve this problem? cuz the previous data needs to be removed when new data comes in.

Thanks everyone.:)


Chris

jay@moduscreate.com
13 May 2012, 4:48 AM
I think you need to remove prior records upon the store's load. :-\