Skip decimal points on y-axis in chartJS

后端 未结 6 1275
说谎
说谎 2020-12-24 00:18

I am using this library to draw charts in my web app. The issue is that I am having decimal points in my y-axis. You can see that in the image below

Is there a way

6条回答
  •  心在旅途
    2020-12-24 01:00

    Another alternative is to use the fixedStepSize option as follows:

    options = {
        scales: {
            yAxes: [{
                ticks: {
                    fixedStepSize: 1
                }
            }],
        },
    };
    

提交回复
热议问题