MayBeWrong commented on issue #242: echart 是否能兼容ExtJs? URL: https://github.com/apache/incubator-echarts/issues/242#issuecomment-395274338 //define like this Ext.define('me.ux.EchartsPanel', { extend: 'Ext.Component', alias: 'widget.echartspanel', liquidLayout: false, initComponent: function () { var me = this; if (!me.height) { //must have a init height } if (!me.option) { //no options } me.on("afterrender", function () {//or boxready if (me.theme) { me.echarts = echarts.init(me.getEl().dom, me.theme); } else { me.echarts = echarts.init(me.getEl().dom); } if (me.option) { me.echarts.setOption(me.option); } }); me.callParent(); me.on("resize", function (ta, width, height, ow, oh, e) { me.echarts.resize(ow - 10, oh - 5); }); } }); //add use like this Ext.create('me.ux.EchartsPanel', { height: 300, option: option, paddingLeft: 10, theme: 'dark', columnWidth: .5, })
---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: [email protected] With regards, Apache Git Services --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
