echarts中y轴刻度设置显示为整数

yAxis: [
    {
        type: 'value',
        name: '销量',
       // min: 0,
       // max: 250,
       // interval: 10, //间隔
        minInterval: 1, //设置成1保证坐标轴分割刻度显示成整数。
        axisLabel: {
            formatter: '{value} 台'
        }
    }
   /* {
        type: 'value',
        name: '销量',
        min: 0,
        max: 25,
        interval: 50,
        axisLabel: {
        formatter: '{value}'
        }
    }*/
],

附相关的文档地址:  

https://www.w3cschool.cn/echarts_tutorial/echarts_tutorial-pj1y2cuo.html

猜你喜欢

转载自blog.csdn.net/yijiupingfan0914/article/details/84975813