echarts 水球图百分比怎么显示小数位啊 ?

echarts 水球 怎么显示小数位呢? 我的配置如下
    var optionFH = {

                     series: [{
                        type: 'liquidFill',
                        data: [0.6115, 0.5, 0.4, 0.3],
                        //第一个就是值 怎么显示为61.15%呢 现在是61%
                        radius: '80%',
                        outline: {
                        borderDistance: 0, //外部轮廓与图表的距离 数字
                        itemStyle:{
                            borderWidth: 0,  //边框的宽度
                            shadowColor: '#000' //外部轮廓的阴影颜色 
                        }
                    },
                    label: { //To change the text, you may use label.formatter, which can be set to a string or function.
                normal: {
                    // formatter: '{a}\n{b}\nValue: {c}', //If it is a string, {a} series name, {b} data name,{c} data value.
                    textStyle: {
                        // color: 'red', //波浪上文本颜色
                        // insideColor: 'yellow', //波浪内部字体颜色
                        fontSize: 10
                    },
                    // position: ['center'], //Text position is at the center by default. label.position can be set to be 'inside', 'left', 'right', 'top', 'bottom', or horizontal and vertical positions like ['10%', '20%'], which means '10%' to the left (controlled by label.align, which can be 'left', 'center', or 'right') and '20%' to the top (controlled by label.baseline, which can be 'top', 'middle', or 'bottom').
                    // position:'top'
                    align: 'center',
                    // baseline: 'center'
 
                }
            },
                    }]
                };

效果图

clipboard.png

我想显示的是 61.15% 后面带着小数的,怎么实现呢?

阅读 6.7k
2 个回答
formatter: function(param) {
    return param.seriesName + '\n'
        + param.name + '\n'
        + 'Value:' + param.value.toFixed(2);
}

请问一下怎么解决

撰写回答
你尚未登录,登录后可以
  • 和开发者交流问题的细节
  • 关注并接收问题和回答的更新提醒
  • 参与内容的编辑和改进,让解决方法与时俱进
推荐问题