Class | Gruff::Pie |
In: |
lib/gruff/pie.rb
|
Parent: | Gruff::Base |
Here‘s how to make a Pie graph:
g = Gruff::Pie.new g.title = "Visual Pie Graph Test" g.data 'Fries', 20 g.data 'Hamburgers', 50 g.write("test/output/pie_keynote.png")
To control where the pie chart starts creating slices, use zero_degree.
TEXT_OFFSET_PERCENTAGE | = | 0.15 |
zero_degree | [RW] | Can be used to make the pie start cutting slices at the top (-90.0) or at another angle. Default is 0.0, which starts at 3 o‘clock. |