1.图例未显示:
看legend是否引入;
legend里数组元素是否正确的格式显示
2.环形图内部显示内容(如:总数xx)
title: [{
text: ‘这是标题’,
textStyle: {
fontSize: 16,
color: ‘#333’
},
x: ‘center’
},{
text: ‘总数xxx’,
subtext: eval(pieproworknum.join("+")) || ‘0’,
textStyle: {
fontSize: 18,
color: ‘#333’
},
subtextStyle: {
fontSize: 20,
fontWeight: ‘bold’,
color: ‘#333’
},
x: ‘center’,
y: ‘middle’
}],
注:eval(pieproworknum.join("+")) || ‘0’,【将数组中所有数据相加的和】