echarts-liquidfill 水球显示小数点

使用echarts-liquidfill.js的水球,水球上显示的文字可以使用chartOption.series[0].label.normal.formatter设置,想显示什么显示什么。
水球插件下载地址
https://files.cnblogs.com/files/tong2018/echarts-liquidfill-master.zip
var chartOption = {
    title: {
        subtext: '',
        subtextStyle: {
            fontSize : 14,
            fontFamily:'serif',
            color: '#ffffff'
        },
        top: '80%',
        textAlign: 'center',
        left: '50%'
    },
    series: [{
        color: ['#86FDFD'],//水波颜色
        type: 'liquidFill',
        waveAnimation: false,//是否流动水球
        animation: false,
        radius: '55%',
        waveLength: '80%',//波长
        waveHeight: '60',//波长
        amplitude: '8%',//振幅
        outline: {
            show: true,
            borderDistance: 4,//内环宽
            itemStyle: {
                color: '#14297b',//内环色
                borderColor: '#86FDFD',//外环色
                borderWidth: 7//外环宽
            }
        },
        backgroundStyle: {
            color: '#14297b'//水球背景色
        },
        label: {
            normal: {
                formatter:"34.34%",//水球上显示文字,可以设置任意文字
                show: true,
                textStyle: {
                    color:'#ffffff',//水球显示文字颜色
                    fontSize: '22',
                    fontFamily:'serif',
                    fontWeight: '100'
                }
            }
        },
        data: [0.34]
    }]
};

  

posted @ 2020-03-16 11:11  文争青  阅读(2399)  评论(1编辑  收藏  举报