6๐
0๐
If anyone will have similiar problem, but with steps that are not bigger by 1 from each other (or other numbers which have common divisor) what means that solution above would not work โ hereโs my solution.
Just return all ticks in "afterBuildTicks" callback in chart.option.scales.yAxes
chart.options.scales = {
yAxes: [{
ticks,
afterBuildTicks: (scale, yTicks) => yourTicks
}]
};
0๐
For anyone else looking for a solution, the autoSkip
option should be set to false
, and the graph wonโt make any adjustments if the ticks donโt fit.
Source:stackexchange.com