echars 3D饼图 多余扇形显示问题

在这里插入图片描述

 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的图会覆盖在表面
      },
    });
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 1
    评论
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值