Book Image

Learning Ext JS_Fourth Edition

Book Image

Learning Ext JS_Fourth Edition

Overview of this book

Table of Contents (22 chapters)
Learning Ext JS Fourth Edition
Credits
About the Authors
About the Reviewers
www.PacktPub.com
Preface
Index

Enhancing our application with charts


The examples covered so far were in traditional code (basic examples using the Ext JS framework directly), but what happens when we want to embed the charts in an MVC or MVVM app? Well! First of all, we need to add a reference to the proper code package that we want to use:

  1. So, let's begin by opening the app.json file (the application code used in chapters 10, 11, and 12) and locating this code:

    "requires": [
     ],
  2. For use in Ext JS charting, let's change it to this:

    "requires": [
    "sencha-charts"
     ],

    Or for legacy charts (Ext JS 4), change to:

    "requires": [
    "ext-charts"
     ],
  3. After this change, save the file. Now, let's use the Sencha CMD tool. Open the CMD tool and type this:

    sencha app build
  4. By using this command, we ensure that our code as well as Ext JS and the Chart package are included in our application. So, after the build ends, let's monitor the changes in our application using this line:

    sencha app watch

    This procedure will make sure that the desired package...