1、代码

水球图支持非常高度定制化的需求,包括颜色(color)、大小(radius)、波的振幅(amplitude)、波长(waveLength)、相位(phase)、周期(period)、移动方向(direction)、形状(shape)、动画(waveAnimation)

option = {
    title: {
        text: '基本水球图'
    },
    series: [{
        type: 'liquidFill',//定义类型
        data: [0.6, 0.5, 0.4, 0.3],//多条波浪,60%, 50%, 40%, and 30%,默认显示第一个数据的百分比,如:60%
        color: ['red', 'blue', 'yellow','green'],//设置颜色系列
        itemStyle: {
                opacity: 0.6//正常样式
        },
        emphasis: {
            itemStyle: {
                opacity: 0.9//悬浮样式
            }
        },
        amplitude: 0,//振幅设置为0,表示水平波浪
        waveAnimation: false,//水波静止,false或0
        animationDuration: 0,//水波持续时间=0
        animationDurationUpdate: 0,//水波持续更新=0
    }]
};

Logo

北京人形旗下天工造物具身智能开源社区,聚焦具身天工与慧思开物两大平台

更多推荐