Hybrid View
-
16 Aug 2012 4:55 AM #1
Unanswered: Stopping the tap event on legend labels
Unanswered: Stopping the tap event on legend labels
How can i stop the tap event on my legend labels.
I have created a pie chart. So the problem is on tapping the legend item that slice is removed from the pie.
I dont want that to happen.
I have tried the below code
Ext.each(chart.legend.items, function(item) {
item.un("mousedown", item.events.mousedown.listeners[0].fn);
})
but it is not working for me.
please find below the code i have used
{
xtype : 'chart',
//width : Ext.os.deviceType == 'Phone' ? 310 : 800,
//height : Ext.os.deviceType == 'Phone' ? 350 : 800,
//scrollable : 'vertical',
flex : 1,
store : {
model: 'NexixViews.model.ControlViewPieChartModel',
data : []
},
shadow : true,
selSeverity : null,
legend: {
position: {
portrait: 'bottom',
landscape: 'left'
}
},
series: [
{
type : 'pie',
field : 'executions',
showInLegend: true
}
]
}
-
18 Aug 2012 9:09 AM #2Sencha - Senior Forum Manager
- Join Date
- Mar 2007
- Location
- St. Louis, MO
- Posts
- 33,656
- Vote Rating
- 435
- Answers
- 3108
Why not extend the series and override the method to handle it?
Mitchell Simoens @SenchaMitch
Sencha Inc, Senior Forum Manager
________________
http://www.JSONPLint.com - Source to lint your JSONP!
Check out my GitHub, lots of nice things for Ext JS 4 and Sencha Touch 2
https://github.com/mitchellsimoens
Think my support is good? Get more personalized support via a support subscription. https://www.sencha.com/store/
Need more help with your app? Hire Sencha Services services@sencha.com
Want to learn Sencha Touch 2? Check out Sencha Touch in Action that is almost in print!
When posting code, please use BBCode's CODE tags.
-
19 Aug 2012 5:49 PM #3
Thanks mitchell for the reply,
Can you give me an example code for the same
Thank you for reporting this bug. We will make it our priority to review this report.


Reply With Quote