PDA

View Full Version : bar chart



kanwar singh
27 Sep 2012, 3:12 AM
Hi,
I have created one Panel inside which i put one bar chart and and a button.Initially chart is showing some peaks with some dummy data from Store(s1).and on click of button chart gets redraw using function redraw() with some different store(s2) and my memory size increases and its increasing as many as times i press of button.
here is my code:
var Chart = Ext.create("Columnchart", {
store : store2
});
var panel = Ext.create('Ext.panel.Panel', {
height:700,
width:1200,
layout:'vbox',
renderTo:'div1',
style: {borderColor:'red', borderStyle:'solid', borderWidth:'1px',padding:'10px'},
items: [
Chart,
{
xtype:'button',
text:'On Click',
width:100,

handler: function() {
Chart.store = store1;
Chart.redraw(true);
}}
],

});
so is there any way to save the memory when i toggle the button for displaying different stores in bar chart..

kanwar singh
28 Sep 2012, 2:50 AM
I have also tried loadData(),sync(),getAt() and set() functions of store for updating the store of chart when i click on button,but the memory is still increasing .

so is there any way,the store gets update with new values without using much memeory on clicking of button.