PDA

View Full Version : How to refresh a pie graph?



ctp
22 May 2013, 6:02 PM
Hi folks,

I try to refresh a pie graph but without any success. I have a window with a combo box and a pie graph. The user should choose the angleField in the select box and the pie graph should be updated automatically. I have this select listener on my combo box:


onUserChartComboBoxListener(): function(combo, records, eOpts) {
var chart = this.down('chart');
chart.angleField = combo.getValue();
console.log(chart);
chart.refresh();

The 'chart' variable refers to the right chart and I get the right value from the combo selection but the pie graph does not refresh. Any hints?

friend
23 May 2013, 5:53 AM
Reloading the chart's store should work, where you can optionally pass params to the store as well:



chart.store.load({
params: {
someParam: 'someValue'
}
});