PDA

View Full Version : How to let series/chart act for clicking the series' label?



zlfpeak
1 Feb 2013, 4:30 PM
I tried to add a "click" to the label's listener, but found no way to call or fire the series' "itemmouseup" event?


series: [ { type: 'column',
axis: 'left',
//highlight: true,
highlightCfg: {
fill: '#BCE954'
},
label: {
display: 'insideEnd',
'text-anchor': 'middle',
field: this.yaxis_fieldNames[0] ,
//renderer: Ext.util.Format.numberRenderer('0'),
// renderer:this.formatURL,
orientation: 'vertical',
color: '#333',
listeners:{"click":function() {
//series.fireEvent('itemmouseup', this);
//findParentByType('column');
Ext.Msg.alert('zlf','Hello');

}



}
}
},

xField: this.xaxis_fieldNames,
yField: this.yaxis_fieldNames,
listeners: {
'itemmouseup': this.itemMouseUp
},
tips: {
trackMouse: true,
width: this.tipsWidth,
height: this.tipsHeight,
renderer: this.tipsRenderer
},

} ],


Actually I need to let users can click the label as well as the column/series to do the same thing, I already has the function to react series' itemmouseup event, but I don't know how to connect its label to its event, or how to call the label's parent series function

HyGy
10 Jun 2013, 7:19 AM
Did you found a solution for this problem?

I have one type of solution, but little bit buggy with IE, in chrome if I click a label it is working, But in IE i need to click exactly on the font. :(