Search code examples
javascriptextjsextjs6

Ext JS 6 - Charts are not found despite including ext-all.js


Despite that I included ext-all.js file in my index page; getting error like below when I try this online Guage chart example provided by Sencha

http://myapp.com/widget/polar.js?_dc=1436970370848 404 (Not Found)
Uncaught Error: [Ext.create] Unrecognized class name / alias: widget.polar

Solution

  • The charts are in a separated package:

    Sencha Charts are not included in the Ext JS library by default. In order to include the charts package, simply add “charts” (“sencha-charts” if working with Ext JS 5.x) to the requires block in your Sencha Cmd generated application’s {appRoot}/app.json file. Adding a package name to the requires array directs Cmd to make the package available to your application.

    https://docs.sencha.com/extjs/5.1/components/introduction_to_charting.html