Being able to create a chart can be useful, but it is even better to be able to control the chart; for example, being able to take certain actions and listen for events on the chart. That is where
Ext.app.Controller comes in, and this is what we'll be investigating in this recipe.
For setting up a basic ExtJS project with Highcharts, refer to the Getting ready section of the Using Highcharts in ExtJS recipe discussed earlier in this chapter.
To get started, perform the following steps:
GenericController.jsfile as follows:
my_project/ app.js index.html extjs/ resources/ app/ controller/ GenericController.js