Results 1 to 3 of 3

Thread: Stopping the tap event on legend labels

Hybrid View

Previous Post Previous Post   Next Post Next Post
    Thank you for reporting this bug. We will make it our priority to review this report.
  1. #1
    Sencha User
    Join Date
    Mar 2012
    Posts
    22
    Answers
    1
    Vote Rating
    0
      0  

    Default 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
    }
    ]
    }

  2. #2
    Sencha - Sr Software Engineer mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    Gainesville, FL
    Posts
    39,553
    Answers
    3931
    Vote Rating
    1272
      0  

    Default

    Why not extend the series and override the method to handle it?
    Mitchell Simoens @LikelyMitch
    Sencha Inc, Senior Software Engineer
    ________________
    Learn BBCode and use it! Checkout the CODE tag!

    Check out my GitHub, lots of nice things for Ext JS and Sencha Touch
    https://github.com/mitchellsimoens

  3. #3
    Sencha User
    Join Date
    Mar 2012
    Posts
    22
    Answers
    1
    Vote Rating
    0
      0  

    Default

    Thanks mitchell for the reply,

    Can you give me an example code for the same

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •