PDA

View Full Version : Pie chart in EXT JS4 MVC



sangita.r9
11 Apr 2012, 1:21 AM
Hi,

I am creating MVC for a pie chart in EXT JS.I want to access the series of pie chart in my controller so that I can add listeners to it.
This is my init function of controller :



init: function() {
this.control({
'piedata': {
render: function(comp) {
comp.series.items[0].listeners = {
itemmouseover:this.mouseOver,
itemmouseout: this.mouseOut,
itemmousedown: this.mouseDown
};

}
}


But, the listeners are not called.Let me know how to achieve this.

Thanks,
Sangita

mitchellsimoens
11 Apr 2012, 12:07 PM
At the time fo the chart rendering, the series is already created. You need to use on() not the listeners config.

mitchellsimoens
11 Apr 2012, 12:08 PM
Moved to Ext JS 4 Q&A forum.