如何解决Sencha饼图图例位置即使指定位置也无法正常工作
Ext.define('Example',{
extend: 'Ext.Panel',xtype: 'piebasic',width: 650,initComponent: function () {
var me = this;
me.myDataStore = Ext.create('Ext.data.JsonStore',{
fields: ['os','data1'],data: [{
os: 'Android',data1: 68.3
},{
os: 'BlackBerry',data1: 1.7
},{
os: 'iOS',data1: 17.9
},{
os: 'Windows Phone',data1: 10.2
},{
os: 'Others',data1: 1.9
}]
});
me.items = [{
xtype: 'polar',animation: false,width: '100%',height: 500,store: me.myDataStore,insetPadding: 50,innerPadding: 20,legend: {
docked: 'bottom'
},interactions: ['rotate','itemhighlight'],series: [{
type: 'pie',angleField: 'data1',label: {
field: 'os',calloutLine: {
length: 60,width: 3
// specifying 'color' is also possible here
}
},highlight: true,tooltip: {
trackMouse: true,renderer: function (storeItem,item) {
storeItem.setHtml(item.get('os') + ': ' + item.get('data1') + '%');
}
}
}]
}];
this.callParent();
}
});
我是sencha图表的新手,我首先在app.json中添加了“图表”,当尝试使用KitchenSink提供的简单图表对我不起作用时。即使指定位置,图例也不会下降。
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。