echarts饼图中间有间隔

时间:2024-03-22 15:20:15
var chartPieState = echarts.init(document.getElementById('chartPieState'));
optionState = {
    tooltip: {
        trigger: 'item',
        formatter: "{a} <br/>{b}: {c} ({d}%)"
    },
    color: ['#6495ed','#ff69b4', '#ba55d3', '#87cefa', '#da70d6','#32cd32',  '#ff7549'],
    legend: {
        orient: 'vertical',
        x: 'left',
        left: '20px',
        data: ['已入园','未入园']
    },
    toolbox: {
        show: true,
        feature: {
            saveAsImage: {show: true}
        },
        right: '20px'
    },
    series: [
        {
            name: '入园状态占比',
            type: 'pie',
            selectedMode: 'single',
            radius: [0, '60%'],
            label: {
                normal: {
                    position: 'inner',
                    show: true,
                    formatter: '{b}: {d}%'
                }
            },
            labelLine: {
                normal: {
                    show: true
                }
            },
            data: [
                {value:335, name:'已入园', selected:true},
                {value:679, name:'未入园'}
            ]
        }
    ]
}
chartPieState.setOption(optionState);

echarts饼图中间有间隔