Skip to content

Force morris to use only integer values on Y axis#341

Closed
t3chn0r wants to merge 2 commits into
morrisjs:masterfrom
t3chn0r:patch-1
Closed

Force morris to use only integer values on Y axis#341
t3chn0r wants to merge 2 commits into
morrisjs:masterfrom
t3chn0r:patch-1

Conversation

@t3chn0r
Copy link
Copy Markdown

@t3chn0r t3chn0r commented Dec 21, 2013

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.

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.
@t3chn0r t3chn0r mentioned this pull request Dec 21, 2013
@t3chn0r
Copy link
Copy Markdown
Author

t3chn0r commented Dec 21, 2013

Not sure how to edit a PR... Need to add a small change:
Line:

step = Math.round(step);

Should be:

step = Math.max(1, Math.round(step));

@sudodoki
Copy link
Copy Markdown
Contributor

Not sure how to edit a PR

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.
@t3chn0r
Copy link
Copy Markdown
Author

t3chn0r commented Dec 23, 2013

Done... I think this PR is ready for some testing...

Thanks @sudodoki, I was able to add a new edit to the PR...

@sudodoki
Copy link
Copy Markdown
Contributor

@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.

@sudodoki
Copy link
Copy Markdown
Contributor

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.

@t3chn0r
Copy link
Copy Markdown
Author

t3chn0r commented Dec 24, 2013

Thanks @sudodoki, didn't realize that... I have no experience whatsoever with Coffee script but I have implemented the changes, hopefully they are good... This is the new PR.

Closing this one.

@t3chn0r t3chn0r closed this Dec 24, 2013
@t3chn0r t3chn0r deleted the patch-1 branch December 24, 2013 00:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants