mercredi 7 janvier 2015

Adding chart Item click in the Controller

Hi,

We are using Ext Js 4.2.2.


We need to implement the Stacked column charts ItemClick event in the controller.

I have tried adding event to the controller as below.



Code:



Chart:

{
xtype: 'chart',
id: 'SummaryChart',
itemId: 'SummaryChart',
action: 'SummaryDrillDown',
axes: [
{
type: 'Numeric',
: 'left',
fields: ['Physical',
'Contractual'],
grid: true,
minimum: 0
},
{
type: 'Category',
: 'bottom',
fields: ['Sec']
}
],
series: [
{
type: 'column',
axis: 'left',
xField: 'Sec',
yField: [
'Physical',
'Contractual'
],
stacked: true,


}
]
}

Controller:

Ext.define('MasterLayout.controller.SummaryController', {
extend: 'Ext.app.Controller',


init: function () {
this.control({
'container button[action=Summarysearch]': {
click: this.onbtnSummarySearchClick
},
'container textfield[action=Summarysearch]': {
keypress: this.ontxtSummarySearchKeypress
},
'container chart[action=SummaryDrillDown]': {
itemclick: this.onColumnItemClick
}
});
},
onColumnItemClick: function (column) {
alert("ItemClick");
},
onbtnSummarySearchClick: function (button) {
alert("button click");
},
ontxtSummarySearchKeypress: function (textfield, e, eOpts) {
alert("key press");
}
});

Button and keypress events are working. But ItemClick event is not working.

When I click on the item, the event is not firing. Its not showing error.

Please help!


Regards,

SivaPrasad.B






Adding chart Item click in the Controller

Aucun commentaire:

Enregistrer un commentaire