PDA

View Full Version : Cannot create an instance of unrecognized alias: series.pie



BrindleFly
18 Jun 2012, 6:00 AM
I have extended the Portlet example to include displaying a pie chart. I am running 4.0.2a. I get an exception
Uncaught Ext.Error: Cannot create an instance of unrecognized alias: series.pie ext-core-dev.js:8336 (http://127.0.0.1:3000/javascripts/ext-core-dev.js)
The portlet extends Panel and the Pie chart is defined via an xtype "chart", with a series containing a type of "pie". Any help would be appreciated.

BrindleFly
18 Jun 2012, 6:14 AM
Here is the full stack trace:


console.trace() ext-core-dev.js:9460 (http://127.0.0.1:3000/javascripts/ext-core-dev.js)

Ext.apply.logext-core-dev.js:9460 (http://127.0.0.1:3000/javascripts/ext-core-dev.js)
Ext.Error.Ext.extend.statics.raiseext-core-dev.js:8329 (http://127.0.0.1:3000/javascripts/ext-core-dev.js)
Ext.ClassManager.instantiateByAliasext-core-dev.js:6457 (http://127.0.0.1:3000/javascripts/ext-core-dev.js)
(anonymous function)ext-core-dev.js:2438 (http://127.0.0.1:3000/javascripts/ext-core-dev.js)
Ext.define.initializeSeriesclasses.js:16065 (http://127.0.0.1:3000/portal/classes.js)
Ext.define.eachclasses.js:7159 (http://127.0.0.1:3000/portal/classes.js)
Ext.define.redrawclasses.js:15817 (http://127.0.0.1:3000/portal/classes.js)
Ext.define.refreshclasses.js:15949 (http://127.0.0.1:3000/portal/classes.js)
fireext-core-dev.js:16837 (http://127.0.0.1:3000/javascripts/ext-core-dev.js)
Ext.define.fireEventclasses.js:202 (http://127.0.0.1:3000/portal/classes.js)
Ext.define.loadRecordsclasses.js:19489 (http://127.0.0.1:3000/portal/classes.js)
Ext.define.onProxyLoadclasses.js:19352 (http://127.0.0.1:3000/portal/classes.js)
Ext.define.processResponseclasses.js:18620 (http://127.0.0.1:3000/portal/classes.js)
(anonymous function)classes.js:18693 (http://127.0.0.1:3000/portal/classes.js)
Ext.apply.callbackext-core-dev.js:8861 (http://127.0.0.1:3000/javascripts/ext-core-dev.js)
Ext.define.onCompleteclasses.js:3459 (http://127.0.0.1:3000/portal/classes.js)
Ext.define.onStateChangeclasses.js:3429 (http://127.0.0.1:3000/portal/classes.js)
(anonymous function)

scottmartin
18 Jun 2012, 9:49 AM
Did you add charts to your require() list?

Scott.

BrindleFly
18 Jun 2012, 10:13 AM
Yes. Any other thoughts? Can change series to other types (e.g. "line") and all works fine. Just cannot get Pie chart to work.

BrindleFly
18 Jun 2012, 4:27 PM
Okay, I think I am all set. I upgraded to 4.1 and switched to including extjs-all.js instead of allclasses.js (which appear to be just the classes required for this example). Case closed. I only wish there was better documentation around the portal example.