echarts图表发现有精度问题
在axisPointer的label中加上 precision:0 就可以设置Y坐标精度为整数了
const option = { //配置
tooltip: { //面板
trigger: 'none',
axisPointer: {
type: 'cross',
label:{
precision:0
//文本标签中数值的小数点精度。默认根据当前轴的值自动判断。也可以指定如 2 表示保留两位小数。
}
}
},
完整详细设置精度在echarts文档链接
https://echarts.apache.org/zh/option.html#grid.tooltip.axisPointer.label.precision