问题当legend比较长,图表和legend里的太近 可能会重叠挡住,效果不好
解决:
series: [
{
name:'人员级别',
type:'pie',
radius: ['35%', '70%'],
center: ['60%', '50%'],// 图表的位置 x,y方向
avoidLabelOverlap: false,
itemStyle: {
normal: {
//定义一个list,然后根据所以取得不同的值,这样就实现了,
color: function(params) {
// build a color map as your need.
var colorList = [
'#ffd733','#feb18b','#2fd0fd','#5