Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Fixed issue when calculating significant, if marker_count is 0 there …

…is a divide by zero error
  • Loading branch information...
commit f64613d8ae2aed1ca87f12db11512f1c2c0999db 1 parent ff2b00e
@BRIMIL01 BRIMIL01 authored BRIMIL01 committed
Showing with 1 addition and 1 deletion.
  1. +1 −1  lib/gruff/base.rb
View
2  lib/gruff/base.rb
@@ -601,7 +601,7 @@ def draw_line_markers
end
@marker_count ||= 4
end
- @increment = (@spread > 0) ? significant(@spread / @marker_count) : 1
+ @increment = (@spread > 0 && @marker_count > 0) ? significant(@spread / @marker_count) : 1
else
# TODO Make this work for negative values
@maximum_value = [@maximum_value.ceil, @y_axis_increment].max
Please sign in to comment.
Something went wrong with that request. Please try again.