1 parent 94d40a8 commit f264b64Copy full SHA for f264b64
1 file changed
lib/gruff/base.rb
@@ -1193,7 +1193,7 @@ def truncate_label_text(text)
1193
def label(value, increment)
1194
label = begin
1195
if increment
1196
- if increment >= 10 || (increment * 1) == (increment * 1).to_i.to_f
+ if increment >= 10 || increment == increment.to_i.to_f
1197
sprintf('%0i', value)
1198
elsif increment >= 1.0 || (increment * 10) == (increment * 10).to_i.to_f
1199
sprintf('%0.1f', value)
0 commit comments