现在我的图表有一个带有十进制值的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
库省略十进制数?
感谢您的任何帮助!
2条答案
按热度按时间k2fxgqgv1#
好吧,我有一个未来的问题和我的查尔兹的答案,
就这样
h6my8fg22#