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
This can now easily be achieved using the precision option:
ticks: {
precision:0
}
As per the documentation.
If defined and stepSize is not specified, the step size will be rounded to this many decimal places.
EXAMPLE
options: {
scale: {
ticks: {
precision: 0
}
}
}
OR (Single Axis)
options: {
scales: {
xAxes: [{
ticks: {
precision: 0
}
}]
}
}