yAxis. axisLabel (坐标轴刻度标签的相关设置)

yAxis.axisLabel. formatter(刻度标签的内容格式器,支持字符串模板和回调函数两种形式。)

官网中的介绍:

 

 具体代码配置:

yAxis: {
            // 设置y轴数据保留三位小数
            axisLabel: {
                formatter: (value, index) => {
                    return value.toFixed(3);
                }
            },
}

 

posted on 2020-10-28 18:02  菜鸟成长日记lx  阅读(4634)  评论(0编辑  收藏  举报