Skip to content

Commit

Permalink
Use the TEXT_OFFSET_PERCENTAGE variable when determining the text off…
Browse files Browse the repository at this point in the history
…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
scnaegle committed Nov 1, 2011
1 parent 6e1a2b0 commit 566e6d2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/gruff/pie.rb
Expand Up @@ -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))

Expand Down

0 comments on commit 566e6d2

Please sign in to comment.