PDA

View Full Version : Bar/Column/Stacked Bar Charts not working with Cmd Production build



bevara.siva
17 Dec 2014, 2:49 AM
Hi,

We are using Sencha Cmd 4.0.4.84 and Ext Js 4.2.2.
I am able to run the charts directly from the application.
When I build using the "Sencha app build production" it is creating the production build in the following folder: App/build/production/MyApp/index.html.
I am not able to run the charts from here. Line chart is working from both the places. But other chart types are not working.

I am getting the following error:


Uncaught TypeError: undefined is not a function
Ext.cmd.derive.redraw
Ext.cmd.derive.afterComponentLayout
Ext.cmd.derive.notifyOwner
Ext.cmd.derive.callLayout
Ext.cmd.derive.flushLayouts
Ext.cmd.derive.runComplete
k
b.implement.callParent
Ext.override.runComplete
Ext.cmd.derive.run
Ext.cmd.derive.statics.flushLayouts
Ext.cmd.derive.statics.resumeLayouts
Ext.resumeLayouts
Ext.cmd.derive.render
Ext.cmd.derive.constructor
b.implement.callParent
Ext.cmd.derive.constructor
AVM338:3 (anonymous function)
Ext.ClassManager.instantiate
(anonymous function)
Ext.application.launch
Ext.cmd.derive.onBeforeLaunch
Ext.cmd.derive.constructor
j
(anonymous function)
(anonymous function)
fire
Ext.apply.readyEvent.j.fire
Ext.apply.fireReadyEvent
(anonymous function)


I have added "ext-charts" to the requires array in the app.json.
When I try to build that it giving the following warning.
[WRN] Failed to resolve package ext-charts

Please help!!

Regards,
SivaPrasad.B

lumberjack
19 Dec 2014, 6:12 AM
Make sure you're requiring all of the needed charts classes for your application. Simplest (but perhaps not the most efficient) method is to add the following to your requires array in your app.js file:



requires: [
'Ext.chart.*'
]

Here's a link to our guide on charting within Ext JS 4.2.x.

http://docs.sencha.com/extjs/4.2.3/#!/guide/charting

Regards,
Brian

bevara.siva
22 Dec 2014, 5:36 AM
Thank you for the response.
I have tried adding "Ext.Chart.*" to the requires section of the app.json.
But its not working. Its giving the same old error message while building the application.

[WRN] Failed to resolve package Ext.Chart.*

How can I debug the application to see what went wrong in the build.

Regards,
SivaPrasad.B

lumberjack
22 Dec 2014, 8:50 AM
You should not be requiring the package in your app.json file. Instead, add the "Ext.Chart.*" to the requires array of your app.js file.

Regards,
Brian