brian7770777 commented on issue #5041:
URL: https://github.com/apache/echarts/issues/5041#issuecomment-3636136246

   解决这个问题的核心方法是使用 yAxis.axisLabel.formatter 来格式化标签
   
   yAxis: {
     type: 'value',
     axisLabel: {
       formatter: function (value) {
         // 先截取特定位数,再转回数字以去除末尾的0
         // 例如:1.2000000001 -> "1.20" -> 1.2
         return parseFloat(value.toFixed(2)); 
       }
     }
   }


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to