{
legend: {
top: "60",//左右上下位置
right: "60",
orient: "vertical",//排列方式 竖着排列
itemWidth: 15,//小方块宽度
textStyle: {
color: "#ffffff",//字体样式
},
formatter: function (name) {
return name + " " + jsonData[name];
},
},
graphic: [ //其他信息 可以是图片 文字
{
type: "text",
left: "27%",
top: "40%",
style: {
text: sum,
textAlign: "center",
fill: "#ffffff",
fontSize: 18,
fontWeight: 400,
},
},
{
type: "text",
left: "25%",
top: "50%",
style: {
text: "总数",
textAlign: "center",
fill: "#ffffff",
fontSize: 18,
fontWeight: 400,
},
},
],
color: [ //饼图颜色
"#5470c6",
"#91cc75",
"#fac858",
"#ee6666",
"#73c0de",
"#3ba272",
"#3ba272",
"#9a60b4",
],
series: [
{
name: "Access From",
type: "pie",
radius: ["45%", "70%"],
avoidLabelOverlap: false,
center: ["30%", "50%"],
label: {
show: false,
position: "center",
},
labelLine: {
show: false,
},
data: data,
},
],
};