echarts Y轴刻度保留几位小数

yAxis: [
                {
                    type: 'value',
                    name: '雨量(mm)',
                    nameLocation: 'start',
                    inverse: true,
            axisLabel: {
                        formatter: function (value, index) {
                            return value.toFixed(1);
                        }
                    }
          }
]
原文地址:https://www.cnblogs.com/gaocong/p/5889704.html