legend: {
orient: "vartical",
x: "left",
top: "center",
left: "50%",
bottom: "0%",
itemWidth: 8, //图形宽度。
itemHeight: 8, //图形高度
itemGap: 16, //图例每项之间的间隔
// 右侧提示框文字样式
textStyle: {
align: "right",
fontSize: 12,
rich: {
// 自定义class
percent: {
padding: [0, 0, 0, 10]
}
}
},
formatter: function(pieDataItem: String) {
// 返回值
let reData: String = "";
switch (pieDataItem) {
case "未使用":
return (
pieDataItem +
"\r" +
"{percent|" +
_this.pieData[0].value +
"张}"
);
case "已使用":
return (
pieDataItem +
"\r" +
"{percent|" +
_this.pieData[1].value +
"张}"
);
case "冻结":
return (
pieDataItem +
"\r" +
"{percent|" +
_this.pieData[2].value +
"张}"
);
}
return reData;
}
},
在 series 设置 center: ["25%", "50%"], //扇形位置设置 , 向左侧偏移