Charts 如何在控制器内添加ExtJS4图表系列的侦听器?

Charts 如何在控制器内添加ExtJS4图表系列的侦听器?,charts,controller,extjs4,listener,webtop,Charts,Controller,Extjs4,Listener,Webtop,我想知道如何将图表系列的侦听器添加到控制器中 我的控制器的init方法如下所示: init: function() { this.control({ 'candidateDistribution > treepanel' : { itemclick: this.treeStoreItemClickHandler }, '#candidateDistributionButton' : {

我想知道如何将图表系列的侦听器添加到控制器中

我的控制器的init方法如下所示:

init: function() {
    this.control({
        'candidateDistribution > treepanel' : {
            itemclick: this.treeStoreItemClickHandler
        },
        '#candidateDistributionButton' : {
            click: this.candidateDistributionButton_ClickHandler
        },
        'competitorAnalysis #slaWiseEmprDistriGrid series': {
            itemmouseup: this.sLA_ItemMouseUpEventHandler
        }
    });
},
xtype: 'chart',
itemId: 'slaWiseEmprDistriGrid',
store: 'SLAWiseCompetitorDistribution',
flex: 2,
animate: true,
legend: {
    position: 'right'
},
insetPadding: 25,
series: [{
    type: 'pie',
    field: 'empCount',
    showInLegend: true,
    listeners: {
        'itemmouseup': function(item) {
            var record = item.storeItem;
            var slaWiseEmpListStore = Ext.data.StoreManager.lookup('SLAEmployerList');
            slaWiseEmpListStore.proxy.extraParams['paramFirstDimensionValue']= record.get('name');
            serviceLineWiseEmpListStore.load();
        }
    }
}] // end of series configuration
在这种情况下,
organizationAnalysis#sLAWiseEmprDistriGrid系列的
itemmouseup
事件处理程序不起作用,但其余事件的事件处理程序工作正常

我试图将组件查询更改为
competitorAnalysis>#slawiseemperdistrigrid series
competitorAnalysis>#slawiseemperdistrigrid[series]
,但它不起作用

我不得不将这个
itemmouseup
事件处理程序添加到chart系列的代码中,该系列代码运行良好,但我认为它打破了MVC模式

我的图表代码如下所示:

init: function() {
    this.control({
        'candidateDistribution > treepanel' : {
            itemclick: this.treeStoreItemClickHandler
        },
        '#candidateDistributionButton' : {
            click: this.candidateDistributionButton_ClickHandler
        },
        'competitorAnalysis #slaWiseEmprDistriGrid series': {
            itemmouseup: this.sLA_ItemMouseUpEventHandler
        }
    });
},
xtype: 'chart',
itemId: 'slaWiseEmprDistriGrid',
store: 'SLAWiseCompetitorDistribution',
flex: 2,
animate: true,
legend: {
    position: 'right'
},
insetPadding: 25,
series: [{
    type: 'pie',
    field: 'empCount',
    showInLegend: true,
    listeners: {
        'itemmouseup': function(item) {
            var record = item.storeItem;
            var slaWiseEmpListStore = Ext.data.StoreManager.lookup('SLAEmployerList');
            slaWiseEmpListStore.proxy.extraParams['paramFirstDimensionValue']= record.get('name');
            serviceLineWiseEmpListStore.load();
        }
    }
}] // end of series configuration
所以我想知道为什么这个
itemmouseup
事件处理程序在控制器中不工作

将来我还想将此应用程序转换为类似web桌面的应用程序,但我无法在extjs文档网站上找到信息/文档/教程。在哪里可以获得有关开发web桌面应用程序的教程/文档


提前谢谢

您可以分两步在控制器中设置此事件

  • 将侦听器添加到图表呈现事件
  • 在此侦听器中,设置系列事件
  • 关于桌面应用程序-我只能建议查看以下示例: