如何在ECharts中省略轴上的小数值?

3

现在我的图表的y轴有小数值,但我只想要完整的数字,比如123

enter image description here

这是我的配置:

 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个回答

2

好的,我有一个关于未来问题和我的孩子的答案。

yAxis.minInterval: 1

that's all


0
yAxis: {
  type: "value",
  minInterval: 1,
}

网页内容由stack overflow 提供, 点击上面的
可以查看英文原文,
原文链接