圣诞水球图

描述:当前是关于Echarts图表中的 水球图 示例。
 
            //需要引入 liquidfill插件
//GitHub地址为: https://github.com/ecomfe/echarts-liquidfill
var uploadedDataURL = "https://img.58h.com.cn/image-174193757172991.png1";
var radius = 250;
option = {
    backgroundColor: '#0ca59c',
    series: [{
        amplitude: 10,
        color: ['#eee', '#f3f3f3', '#fff'],
        type: 'liquidFill',
        radius: radius,
        data: [1, 1, 1],
        animationDuration: 0,
        animationDurationUpdate: 4000,
        label: {
            normal: {
                formatter: function() {
                    return '';
                }
            }
        },
        backgroundStyle: {
            color: 'transparent'
        },
        outline: {
            borderDistance: 5,
            itemStyle: {
                borderColor: '#fff',
                borderWidth: 5
            }
        }
    }],
    graphic: {
        elements: [{
            type: 'image',
            style: {
                image: uploadedDataURL,
                width: radius,
                height: radius
            },
            left: 'center',
            top: 'middle'
        }]
    }
};

setTimeout(function() {
    myChart.setOption({
        series: [{
            data: [0.3, 0.3, 0.3],
            color: ['rgba(238,238,238,.4)', 'rgba(243,243,243,.3)', 'rgba(255,255,255,.5)'],
        }]
    })
}, 2000);