Reputation: 6466
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
Upvotes: 3
Views: 5845
Reputation: 4196
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.
Upvotes: 0
Reputation: 594
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">
...
Upvotes: 1
Reputation: 902
I had exactly same problem in rendering polar charts.Found out below solution: Add below in application.js
requires: ['Ext.chart.*']
Upvotes: 1
Reputation: 359
"requires": [
"charts"
],
This should be uncommented from your app.json
Upvotes: 4
Reputation: 136
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 :)
Upvotes: 1
Reputation: 74096
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
Upvotes: 6