Results 1 to 3 of 3

Thread: Pie chart in EXT JS4 MVC

  1. #1
    Sencha User
    Join Date
    Mar 2012
    Posts
    19
    Vote Rating
    0
      0  

    Default Pie chart in EXT JS4 MVC

    Hi,

    I am creating MVC for a pie chart in EXT JS.I want to access the series of pie chart in my controller so that I can add listeners to it.
    This is my init function of controller :
    Code:
      init: function() {
            this.control({
               'piedata': {
                    render: function(comp) {
                        comp.series.items[0].listeners = {
                            itemmouseover:this.mouseOver,
                            itemmouseout: this.mouseOut,
                            itemmousedown: this.mouseDown
                        };
                   
               }
                   }
    But, the listeners are not called.Let me know how to achieve this.

    Thanks,
    Sangita

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

    Default

    At the time fo the chart rendering, the series is already created. You need to use on() not the listeners config.
    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 - Sr Software Engineer mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    Gainesville, FL
    Posts
    39,556
    Answers
    3932
    Vote Rating
    1272
      0  

    Default

    Moved to Ext JS 4 Q&A forum.
    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

Posting Permissions

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