最终效果
echart一开始我用的版本是4.4.0,怎么改都不生效,然后把版本升级到5.2.1,就生效了
主要改leng里就可以了
option = {
tooltip: {
trigger: 'item',
formatter: '{a} <br/>{b} : {c} ({d}%)'
},
legend: {
left: 'center',
align: "left",
bottom: '-5',
itemWidth:0,
itemHeight:0,
formatter: function (name) {
return [
'{a|'+name+'}'
].join('\n');
},
textStyle: {
//rich放在textStyle里面
rich: {
a: {
color: '#fff',
lineHeight: 15,
padding:[5,15,5,15],
backgroundC