1. #1
    Sencha User
    Join Date
    Mar 2012
    Posts
    27
    Answers
    1
    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
    Gainesville, FL
    Posts
    37,330
    Answers
    3541
    Vote Rating
    847
    mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute

      0  

    Default


    Try firing an event in the interaction. That may be listenable from the chart.
    Mitchell Simoens @SenchaMitch
    Sencha Inc, Senior Forum Manager
    ________________
    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 in print!

    When posting code, please use BBCode's CODE tags.

  4. #3
    Sencha User jep's Avatar
    Join Date
    Sep 2010
    Posts
    862
    Answers
    1
    Vote Rating
    21
    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
    Sencha User jep's Avatar
    Join Date
    Sep 2010
    Posts
    862
    Answers
    1
    Vote Rating
    21
    jep will become famous soon enough jep will become famous soon enough

      0  

    Default


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

Thread Participants: 2

Tags for this Thread