i made bar column chart using extjs mvc. in controller want add function click event catch selected value of column. here controller code:
ext.define('gamma.controller.controlfile', { extend : 'ext.app.controller', //define stores stores : ['barcolumn','radarview','voicecallstore','smscallstore','mmscallstore','gprsusagestore'], //define models models : ['barcol','radar','voicecallmodel','smscallmodel','mmscallmodel','gprsusagemodel'], //define views views : ['barcolumnchart','linechart','radarchart','voicepie','smspie','mmspie','gprspie'], init : function() { this.control({ }); } });
please 1 me.
- on chart:
listeners : { itemmousedown : function(obj) { this.fireevent('itemmousedownchartbar',obj); } }
at final on chart defined, after this.callparent()
:
this.addevents('itemmousedownchartbar');
- now, on controller:
'barchartview' : { itemmousedownchartbar: this.function_to_call }
Comments
Post a Comment