现在我的图表的y轴有小数值,但我只想要完整的数字,比如1
、2
或3
这是我的配置:
const option: EChartsOption = {
dataset: {
source: data()
},
grid: {
left: "3%",
right: "4%",
bottom: "3%",
containLabel: true
},
xAxis: {
type: "category",
splitLine: {
show: true,
lineStyle: {
color: "#272A30",
width: 1
}
}
},
yAxis: {
type: "value",
axisLabel: {
color: "white",
fontSize: 11
},
splitLine: {
lineStyle: {
color: "#272A30",
width: 1
}
}
},
series: [
{
type: "line",
smooth: true,
name: "Incidents",
showSymbol: false,
color: "#E24D42",
symbolSize: 0,
lineStyle: {
color: "#E24D42"
},
label: {
precision: 2
}
}
]
};
如何在React中使用
echarts
库省略小数?感谢任何帮助!