"requires": [
"sencha-charts"
],
Ext.application({
name: 'ChartTestApp',
extend: 'ChartTestApp.Application',
autoCreateViewport: false
});
Application.js
Ext.define('ChartTestApp.Application', {
extend: 'Deft.mvc.Application',
name: 'ChartTestApp',
init: function() {
return Ext.create('ChartTestApp.view.main.Main');
}
});
Ext.define('ChartTestApp.view.main.Main', {
extend: 'Ext.container.Container',
requires: [
'Ext.chart.PolarChart',
'Ext.chart.series.Pie',
],
items: [{
xtype: 'polar',
width: 500,
height: 500,
store: Ext.create('Ext.data.JsonStore', {
fields: ['os', 'data1' ],
data: [
{ os: 'Android', data1: 68.3 },
{ os: 'BlackBerry', data1: 1.7 },
]}),
series: [{
type: 'pie',
angleField: 'data1',
}]
}]
});
I'm using DeftJS5 + extJS 5.1. If I remove DeftJS from the code (change Deft.mvc.Application to Ext.app.Application), there is no more problem.
Is there any compatibility issues with the charting components?
Thx!
--
Deft JS home page: http://deftjs.org/
Wiki: https://github.com/deftjs/DeftJS/wiki
For rules and tips on asking questions on the Deft JS mailing list: https://github.com/deftjs/DeftJS/wiki/Asking-Questions-on-the-Mailing-List
---
You received this message because you are subscribed to the Google Groups "Deft JS" group.
To unsubscribe from this group and stop receiving emails from it, send an email to deftjs+un...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/deftjs/2b4cda56-2d69-4072-9173-c9c516ddb454%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
To view this discussion on the web visit https://groups.google.com/d/msgid/deftjs/3d104368-7cf0-4f15-9216-4caf304a7637%40googlegroups.com.
function() {
Ext.Function.interceptAfter(Ext.ComponentManager, 'register', function(component) {
Deft.event.LiveEventBus.register(component);
});
register: function(component) {
component.on('added', this.onComponentAdded, this);
component.on('removed', this.onComponentRemoved, this);
},
component.on will add a listener to the component by calling doAddListener in Ext.mixin.Observable:
if (event.addListener(fn, scope, options, caller, manager)) {
me.hasListeners._incr_(ename);
}
constructor: function(config) {
var me = this,
self = me.self,
declaredListeners, listeners, bubbleEvents;
me.hasListeners = new me.HasListeners();
...
}
To view this discussion on the web visit https://groups.google.com/d/msgid/deftjs/f55ff5c8-9ac0-4bc5-95d6-24e23bf1d61f%40googlegroups.com.
constructor: function (config) {
var me = this;
me.getId();
me.sprites = [];
me.dataRange = [];
// Original place of component register
// Ext.ComponentManager.register(me);
if (config) {
// Backward compatibility with Ext.
if (config.tips) {
config = Ext.apply({
tooltip: config.tips
}, config);
}
// Backward compatibility with Touch.
if (config.highlightCfg) {
config = Ext.apply({
highlight: config.highlightCfg
}, config);
}
}
me.mixins.observable.constructor.call(me, config);
// register component here, after observable constructor call
Ext.ComponentManager.register(me);
},
...
To view this discussion on the web visit https://groups.google.com/d/msgid/deftjs/0bcbbaa0-bec3-415e-8208-f081485dcdec%40googlegroups.com.