-
22 May 2012 12:35 AM #1
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:
Since my application has a controller i would like to know how i can control this itemInfo interaction with my controller?Code:interactions:[{ type:'iteminfo', listeners: { show:function(me, item, panel){ panel.setHtml('Stock Price: $'+ item.storeItem.get('price')); } } }]
Thanks in advance!
-
Best Answer Posted by mitchellsimoens
Try firing an event in the interaction. That may be listenable from the chart.
-
24 May 2012 4:28 AM #2Sencha - Senior Forum Manager
- Join Date
- Mar 2007
- Location
- St. Louis, MO
- Posts
- 33,684
- Vote Rating
- 435
- Answers
- 3111
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.
-
31 Oct 2012 8:03 PM #3
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.
-
31 Oct 2012 8:30 PM #4
It's also a problem with renderers on axes...


Reply With Quote