Skip to content

Commit

Permalink
Fixes #71.
Browse files Browse the repository at this point in the history
  • Loading branch information
oesmith committed Aug 17, 2012
1 parent eacbc01 commit 8d7522a
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 1 deletion.
8 changes: 8 additions & 0 deletions lib/morris.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -144,12 +144,20 @@ class Morris.Line
@ymax = Math.max parseInt(@options.ymax[5..], 10), ymax
else
@ymax = ymax
else if typeof @options.ymax is 'string'
@ymax = parseInt(@options.ymax, 10)
else
@ymax = @options.ymax
if typeof @options.ymin is 'string' and @options.ymin[0..3] is 'auto'
ymin = Math.min.apply null, Array.prototype.concat.apply([], @series)
if @options.ymin.length > 5
@ymin = Math.min parseInt(@options.ymin[5..], 10), ymin
else
@ymin = ymin
else if typeof @options.ymin is 'string'
@ymin = parseInt(@options.ymin, 10)
else
@ymin = @options.ymin
if @ymin is @ymax
@ymin -= 1
@ymax += 1
Expand Down
8 changes: 8 additions & 0 deletions morris.js

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

Loading

0 comments on commit 8d7522a

Please sign in to comment.