javascript - ExtJs taskrunner using Slider -
i trying load chart/grid should change data displayed after time interval .i have used extjs taskrunner, reloads store(project store fetched data using proxy ajax type call) after specific time interval user sets extjs slider .
var runner = new ext.util.taskrunner(), task = runner.start({ run: function() { store.reload(); }, interval: function(){ return ext.getcmp('myslider').value(); } }); runner.stop(); }
here fiddle :
https://fiddle.sencha.com/#fiddle/p49
the interval given slider not setting runner . how give value slider runner , right approach show live data on dashboard, graphs changing whenever data backend changes
for setting new runner new timer need destroy old 1 in slider's listener thing this.
, listeners:{ changecomplete: function( me, newvalue, thumb, eopts ){ console.log(newvalue) var val = newvalue*1000; //destroy runner runner.destroy() //make new runner , task , set teh new slider time runner = new ext.util.taskrunner(); task = runner.start({ run: myrun, interval: val }); } },
full running code here: https://fiddle.sencha.com/#fiddle/p57
Comments
Post a Comment