1. #1
    Sencha User
    Join Date
    Mar 2012
    Posts
    11
    Vote Rating
    1
    RuBenKlunZ is on a distinguished road

      0  

    Default Answered: Chart Interactions through controller

    Answered: Chart Interactions through controller


    Hey,

    I am working on a touch charts application with a MVC structure.
    I read about how the charts use interactions to respond to user events, one of these interactions is the 'itemInfo'. The example of it looks like this:
    Code:
    interactions:[{
      type:'iteminfo',
      listeners: {            
        show:function(me, item, panel){                
          panel.setHtml('Stock Price: $'+ item.storeItem.get('price'));
        }
      } 
    }]
    
    Since my application has a controller i would like to know how i can control this itemInfo interaction with my controller?

    Thanks in advance!

  2. Try firing an event in the interaction. That may be listenable from the chart.

  3. #2
    Sencha - Senior Forum Manager mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    St. Louis, MO
    Posts
    33,684
    Vote Rating
    435
    Answers
    3111
    mitchellsimoens has much to be proud of mitchellsimoens has much to be proud of mitchellsimoens has much to be proud of mitchellsimoens has much to be proud of mitchellsimoens has much to be proud of mitchellsimoens has much to be proud of mitchellsimoens has much to be proud of mitchellsimoens has much to be proud of mitchellsimoens has much to be proud of

      0  

    Default


    Try firing an event in the interaction. That may be listenable from the chart.
    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.

  4. #3
    Touch Premium Member jep's Avatar
    Join Date
    Sep 2010
    Posts
    861
    Vote Rating
    18
    Answers
    1
    jep will become famous soon enough jep will become famous soon enough

      0  

    Default


    Is this still the case in 2.1 RC2, Mitchell? It seems a shame because it makes interactions a bit more clunky to fit into the MVC architecture. You either have to go modify the interaction class (which is especially dicey if it's not your code), or you have to stick a bunch of code in your view that you'd rather keep clean of logic like that.

  5. #4
    Touch Premium Member jep's Avatar
    Join Date
    Sep 2010
    Posts
    861
    Vote Rating
    18
    Answers
    1
    jep will become famous soon enough jep will become famous soon enough

      0  

    Default


    It's also a problem with renderers on axes...

Tags for this Thread