Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Use the TEXT_OFFSET_PERCENTAGE variable when determining the text off…

…set. This allows users to just override this variable, instead of having to modify the code to get the percentages closer to the pie graph
  • Loading branch information...
commit 566e6d22926557f24d69ac66469673e94bb1c4da 1 parent 6e1a2b0
@scnaegle scnaegle authored
Showing with 1 addition and 1 deletion.
  1. +1 −1  lib/gruff/pie.rb
View
2  lib/gruff/pie.rb
@@ -92,7 +92,7 @@ def draw_label(center_x, center_y, angle, radius, amount)
x_offset = center_x # + 15.0 # The label points need to be tweaked slightly
y_offset = center_y # This one doesn't though
radius_offset = (radius + r_offset)
- ellipse_factor = radius_offset * 0.15
+ ellipse_factor = radius_offset * TEXT_OFFSET_PERCENTAGE
x = x_offset + ((radius_offset + ellipse_factor) * Math.cos(angle.deg2rad))
y = y_offset + (radius_offset * Math.sin(angle.deg2rad))
Please sign in to comment.
Something went wrong with that request. Please try again.