echarts怎么实现这种图表呢,求指导,

echarts怎么实现这种图表呢,求指导,如果设置为透明,另一半的虚线怎么设置

clipboard.png

阅读 3.4k
4 个回答
placeHolderStyle = {
    normal: {
        label: {
            show: false,
            position: "center"
        },
        labelLine: {
            show: false
        },
        borderWidth: 3,
        color: "#fff",
        borderColor: "#dedede",
         borderType:'dashed'
    },
    emphasis: {
        color: "#dedede",
        borderColor: "#dedede",
        borderWidth: 0,
    }
};
option = {
    backgroundColor: '#fff',
    color: ['#fc7a26', '#fff', '#ffa127', '#fff', "#ffcd26"],
    legend: [{
        orient: '',
        icon: 'circle',
        left: 'right',
        top: 'center',
        data: ['不喜欢', '喜欢', '跳过']
    }],
    series: [
        {
        name: '值',
        type: 'pie',
        clockWise: true, //顺时加载
        hoverAnimation: false, //鼠标移入变大
        radius: [199, 200],
        itemStyle: {
            normal: {
                label: {
                    show: true,
                    position: 'outside'
                },
                labelLine: {
                    show: true,
                    length: 100,
                    smooth: 0.5
                },
                borderWidth: 6,
                shadowBlur: 40,
                borderColor: "#fc7a26",
                shadowColor: 'rgba(0, 0, 0, 0)', //边框阴影
               
            }
        },
        data: [{
            value: 7,
            name: '70%'
        }, {
            value: 3,
            name: '',
            itemStyle:placeHolderStyle,
        }]
    }
]
};

clipboard.png
大概写了一下 改一下就可以了

可以用zrender计算后 画那个弧线

撰写回答
你尚未登录,登录后可以
  • 和开发者交流问题的细节
  • 关注并接收问题和回答的更新提醒
  • 参与内容的编辑和改进,让解决方法与时俱进
推荐问题