Search code examples
extjs5extjs-chart

ExtJS 5 Charts: Chart works in fiddle but not in application


A simple chart I made works fine in Sencha Fiddle (see here) but will not run in my application. the error I can see in Chrome Developer Tools is:

*Uncaught TypeError: Cannot read property 'get' of undefined* at ext-all.js:19

I included ext-charts.js and even Cartesian.js to see if this will help, but no cigar.

<script type="text/javascript" src="Components/Sencha/ext-all.js"></script>
<script type="text/javascript" src="Components/Sencha/packages/ext-charts/build/ext-charts.js"></script>
<script type="text/javascript" src="Components/Sencha/packages/ext-charts/src/chart/series/Cartesian.js"></script>

Anyone has an idea why this happens?


Solution

  • Well, it turns out ext-charts is the old charts package from ExtJS 4 and sencha-charts is the new charts package introduced in ExtJS 5.

    Sencha Fiddle with ExtJS version lower than 5.0.1 won´t render the charts because the package is missing.

    My version is 5.0.1 so loading the sencha-charts package solved the problem.