乐趣区

关于echarts:三个pie交互

`var placeHolderStyle = {

normal: {
    label: {show: false},
    labelLine: {show: false},
    color: "rgba(0,0,0,0)",
    borderWidth: 0
},
emphasis: {color: "rgba(0,0,0,0)",
    borderWidth: 0
}

};

option = {

series: [

     {
        name: '',
        type: 'pie',
        startAngle: 0,
        radius: ['40%', '70%'],
        avoidLabelOverlap: false,
        label: {
            show: false,
            position: 'center'
        },
        emphasis: {
            label: {
                show: true,
                fontSize: '30',
                fontWeight: 'bold'
            }
        },
        labelLine: {show: false},
        data: [{value: 10, name: '10',},
           {
                value: 5,
                itemStyle: placeHolderStyle,
            },
           
        ]
    },
    {
        name: '',
        type: 'pie',
        startAngle: (5/15*360),
        radius: ['40%', '60%'],
        avoidLabelOverlap: false,
        label: {
            show: false,
            position: 'center'
        },
        emphasis: {
            label: {
                show: true,
                fontSize: '30',
                fontWeight: 'bold'
            }
        },
        labelLine: {show: false},
        data: [{value: 7, name: '7',},
           {
                value: 8,
                itemStyle: placeHolderStyle,
            },
           
        ]
    },{
        name: '',
        type: 'pie',
        startAngle: ((5/15+8/15+2/15)*360),
        radius: ['40%', '50%'],
        avoidLabelOverlap: false,
        label: {
            show: false,
            position: 'center'
        },
        emphasis: {
            label: {
                show: true,
                fontSize: '30',
                fontWeight: 'bold'
            }
        },
        labelLine: {show: false},
        data: [{value: 2, name: '2',itemStyle:{color:'pink'}
                
            },
           {
                value: 13,
                itemStyle: placeHolderStyle,
            },
           
        ]
    }
]

};
`

退出移动版