option.series.push({
name: "pie2d",
backgroundColor: "transparent",
type: "pie",
labelLine: {
length: 30,
length2: 30,
color: "rgba(255,255,255,1)",
lineStyle: {
type: "solid",
},
},
minAngle: 0, //最小角度
startAngle: -40, //起始角度,支持范围[0, 360]。
clockwise: false, //饼图的扇区是否是顺时针排布。上述这两项配置主要是为了对齐3d的样式
radius: ["20%", "50%"],
center: ["50%", "50%"],
data: [
{
name: "优秀科目",
value: 0,
itemStyle: {
color: "rgba(0,191,221,1)",
},
},
{
name: "良好科目",
value: 0,
itemStyle: {
color: "rgba(62,150,234,1)",
},
},
{
name: "及格科目",
value: 0,
itemStyle: {
color: "rgba(247,196,87,1)",
// opacity: 0.7, // 会造成饼图显示扇形 如上图
},
},
{
name: "不及格科目",
value: 0,
itemStyle: {
color: "rgba(238,119,44,1)",
},
},
],
itemStyle: {
opacity: 0, //这里必须是0,不然2d的图会覆盖在表面
},
});
echars 3D饼图 多余扇形显示问题
最新推荐文章于 2024-06-09 13:42:05 发布