Skip to content

Commit

Permalink
Don't go negative on ymin if ymin==ymax==0 (fix #80).
Browse files Browse the repository at this point in the history
  • Loading branch information
oesmith committed Sep 26, 2012
1 parent 088233d commit e0b406f
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 3 deletions.
2 changes: 1 addition & 1 deletion lib/morris.line.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@ class Morris.Line
else
@ymin = @options.ymin
if @ymin is @ymax
@ymin -= 1
if @ymin is not 0 then @ymin -= 1
@ymax += 1

@yInterval = (@ymax - @ymin) / (@options.numLines - 1)
Expand Down
4 changes: 3 additions & 1 deletion morris.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit e0b406f

Please sign in to comment.