Using `stepSize` and `maxTicksLimit` together doesn’t work.

I want to have a chart with a minimal stepSize of 1, basically I don’t want the steps to have decimals like 0.5 or something. I can set stepSize to 1, but then it will show a label for each step regardless of maxTicksLimit.

You can see the problem here:

If you disable the stepSize option, the labels are fine, but if you then disable “dataset 1” and it only shows “dataset 2”, it will have steps like 0.5 and 1.5 which I don’t want.

Am I missing configuration or is this an issue?

Many thanks!

Author: Fantashit

4 thoughts on “Using `stepSize` and `maxTicksLimit` together doesn’t work.

  1. Unfortunately setting stepSize to 1 has a effect I don’t like. When you look at my fiddle:

    You see the yAxis goes to 19. Without the stepSize option it will go to 20:

    I like this behaviour better because it’s easier to read when it goes in steps of 5 up to 20, instead of steps of 4 up to 19.

    So if the minStepSize option would be implemented it would solve these two problems. Do you think it will be hard to implement? I wouldn’t mind giving it a try myself.

  2. @chris-wood-dynmark I think that would be supported with the minStepSize set to 1 but I’ve edited my list above to include that requirement.

    I wrote that we should support it for both minStepSize and stepSize though I kind of feel that it is more applicable to stepSize only. Since it forces the stepSize to be a certain value, while minStepSize still runs the auto generate algorithm (which takes into account maxTicksLimit) it might be odd to have it apply in that case since there are 2 variables for adjusting the step size.

Comments are closed.