Force morris to use only integer values on Y axis#341
Conversation
New option gridIntegers was added to force morris to use only integer numbers on the Y axis. gridIntegers accepts a boolean value (false=default). When set to true, morris will use only integer values on the Y axis.
|
Not sure how to edit a PR... Need to add a small change: step = Math.round(step);Should be: step = Math.max(1, Math.round(step)); |
Just add commits to the same branch, it will update PR. Or, in case you want to do single commit, you can use rebase + squash though be sure to squash only your commits, so that you're not trying to rewrite history in original repo. |
Added a Math.max() wrap around the Math.round() to make sure the step is at least 1 when integers are forced.
|
Done... I think this PR is ready for some testing... Thanks @sudodoki, I was able to add a new edit to the PR... |
|
@t3chn0r , only issue is you're trying to update build file, instead of editing source coffee files. Sorry for not telling you earilier, did not see it the first time. |
|
I did little search and it seems your changes should go around grid.coffee#L223. In case you're not familiar with coffee script, there's awesome Little book of coffee script. It's nothing hard and be sure to ping me in case you need any help with that. |
New option gridIntegers was added to force morris to use only integer numbers on the Y axis. gridIntegers accepts a boolean value (false=default). When set to true, morris will use only integer values on the Y axis.