Results 1 to 4 of 4

Thread: Chart Interactions through controller

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

    Default 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 User mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    Gainesville, FL
    Posts
    40,050
    Answers
    3976
    Vote Rating
    1381
      0  

    Default

    Try firing an event in the interaction. That may be listenable from the chart.
    Mitchell Simoens @LikelyMitch
    Modus Create, Senior Frontend Engineer
    ________________
    Need any sort of Ext JS help? Modus Create is here to help!

    Check out my GitHub:
    https://github.com/mitchellsimoens

  4. #3
    Sencha User jep's Avatar
    Join Date
    Sep 2010
    Posts
    862
    Answers
    1
    Vote Rating
    24
      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
    24
      0  

    Default

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

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
  •