3

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
Tarabass
  • 3,132
  • 2
  • 17
  • 35
talha06
  • 6,206
  • 21
  • 92
  • 147

6 Answers6

6

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

CD..
  • 72,281
  • 25
  • 154
  • 163
  • 3
    If you **do not use Sencha Cmd**; here is the required `paths` in order to use Sencha Charts: `'Ext.chart' : 'extjs/packages/charts/src/chart', 'Ext.draw' : 'extjs/packages/charts/src/draw'` – talha06 Jul 16 '15 at 13:38
  • @talha06 where do I put those paths? – Razgriz Nov 30 '21 at 15:34
4
"requires": [
    "charts"
],

This should be uncommented from your app.json

Shashi
  • 339
  • 1
  • 4
  • 15
1

In Extjs 6, you have to include sencha charts by uncommenting

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

in app.json and the run sencha app watch command in sencha cmd through application folder.

It works for me, hope this will be helpful to you :)

Rohit Sharma
  • 136
  • 4
1

I had exactly same problem in rendering polar charts.Found out below solution: Add below in application.js

requires: ['Ext.chart.*']
Tejas
  • 894
  • 7
  • 24
1

In addition to uncommenting "required" : 'Charts' ('charts' for ExtJS 6, and 'sencha-charts' for ExtJS 5) that works well for Sencha Cmd projects, I see that you include ext-all.js files by yourself. Probably you need to find them... you can find all files there ->

https://cdnjs.com/libraries/extjs/6.2.0 All ExtJS files, used for including. That may be used for online linking (in jsfiddle.net, for example). Write at the end 6.1.0, 6.0.0, 5.1.0 or any version you need.

Found within this linkage example https://www.sencha.com/forum/showthread.php?303990-Is-there-a-free-GPA-CDN-for-ExtJS-6-l&p=1115697&viewfull=1#post1115697
In jsfiddle - https://jsfiddle.net/Elunyfay/7v0uo2w6/7/

<!DOCTYPE html><html>
<head>
<script type="text/javascript" src="http://cdnjs.cloudflare.com/ajax/libs/extjs/6.0.0/ext-all-debug.js"></script>

<link rel="stylesheet" type="text/css" href="http://cdnjs.cloudflare.com/ajax/libs/extjs/6.0.0/classic/theme-triton/resources/theme-triton-all-debug.css">
<script type="text/javascript" src="http://cdnjs.cloudflare.com/ajax/libs/extjs/6.0.0/classic/theme-triton/theme-triton-debug.js"></script>

<script type="text/javascript" src="http://cdnjs.cloudflare.com/ajax/libs/extjs/6.0.0/packages/charts/classic/charts-debug.js"></script>
<link type="text/css" href="http://cdnjs.cloudflare.com/ajax/libs/extjs/6.0.0/packages/charts/classic/classic/resources/charts-all-debug.css">
...
Eluny
  • 574
  • 5
  • 15
0

For ExtJS 6.x using open tooling - you have to install charts module manually

npm install @sencha/ext-charts

(do not use -g flag because Sencha CMD searches for files in the source folder)

and than add

"requires": [
    "charts"
],

to your app.json file.

Sergey Novikov
  • 4,096
  • 7
  • 33
  • 59