echarts pie 饼图宽度
程序员文章站
2022-05-26 22:02:33
...
效果图:
代码:
//饼图
initPieECharts() {
let _this = this;
let charts: any = _this.$echarts.init(document.getElementById("mainPie"));
charts.setOption({
color: ["#b6e5ff", "#b2d1f3", "#00a1ff"],
// 点击扇形 显示提示
tooltip: {
trigger: "item"
},
series: [
{
name: "水果",
type: "pie",
radius: ["35%", "60%"],
label: {
normal: {
formatter: "{c}({d}%)\n{b}",
textStyle: {
fontWeight: "normal",
fontSize: 12,
color: "#178CE6"
},
lineHeight: 20
}
},
itemStyle: {
normal: {
borderColor: "#ffffff",
borderWidth: 6
}
},
data: [
{
value: 10,
name: "苹果"
},
{
value: 30,
name: "梨子"
},
{
value: 60,
name: "香蕉"
}
]
}
]
});
}
上一篇: Calendar 日历
下一篇: CORDIC之线性坐标系旋转