ECharts Liquid Fill Chart-3-单个水波颜色、移动方向设置

1、代码

//水球图支持非常高度定制化的需求,包括颜色(color)、大小(radius)、波的振幅(amplitude)、波长(waveLength)、相位(phase)、周期(period)、移动方向(direction)、形状(shape)、动画(waveAnimation)等等,
var option = {
    title: {
        text: '水球图对单个波的配置'
    },
    series: [{
        type: 'liquidFill',
        radius: '50%', //半径大小,取值百分比
        data: [0.6, {
                value: 0.5,
                direction: 'left', //水波移动的方向,默认right,top 和bottom时,单条水波静止
                itemStyle: {
                    normal: { //正常样式
                        color: 'red',
                        opacity: 0.6
                    }
                },
            },
            {
                value: 0.4,
                direction: 'top', //水波静止
                itemStyle: {
                    normal: { //正常样式
                        color: 'yellow',
                        opacity: 0.6
                    }
                },
            },
            0.3
        ]
    }]
};

猜你喜欢

转载自blog.csdn.net/lzzmandy/article/details/80798460