Skip to content

Fixed a ZeroDivision BUG that appears when you launch the first example. #22

Merged
merged 2 commits into from Jun 6, 2012
View
3 README.txt
@@ -1,3 +1,6 @@
+== MAIN FIX
+ Zero Division Problem
+
== Gruff Graphs
A library for making beautiful graphs.
View
2 lib/gruff/base.rb
@@ -1066,7 +1066,7 @@ def increment_color
# Return a formatted string representing a number value that should be
# printed as a label.
def label(value)
- label = if (@spread.to_f % @marker_count.to_f == 0) || !@y_axis_increment.nil?
+ label = if (@spread.to_f % (@marker_count.to_f==0 ? 1 : @marker_count.to_f) == 0) || !@y_axis_increment.nil?
value.to_i.to_s
elsif @spread > 10.0
sprintf("%0i", value)
Something went wrong with that request. Please try again.