]> projects.mako.cc - selectricity-live/blob - vendor/plugins/gruff/lib/gruff/mini/pie.rb
7822ba53d6645afda3d584fb2cd7e92929adf692
[selectricity-live] / vendor / plugins / gruff / lib / gruff / mini / pie.rb
1 ##
2 #
3 # Makes a small pie graph suitable for display at 200px or even smaller.
4 #
5 module Gruff
6   module Mini
7
8     class Pie < Gruff::Pie
9
10       include Gruff::Mini::Legend
11
12       def initialize_ivars
13         super
14         
15         @hide_legend = true
16         @hide_title = true
17         @hide_line_numbers = true
18   
19         @marker_font_size = 60.0
20         @legend_font_size = 60.0
21       end
22
23       def draw
24         expand_canvas_for_vertical_legend
25         
26         super
27         
28         draw_vertical_legend
29         
30         @d.draw(@base_image)
31       end # def draw
32
33     end # class Pie
34   
35   end
36 end

Benjamin Mako Hill || Want to submit a patch?