X-Git-Url: https://projects.mako.cc/source/selectricity/blobdiff_plain/1a62f78f4f3818ab697bddf51f80a1ba150ce9e7..131cab23209cb1dfa81930240b8cf722d2302131:/lib/gruff-0.2.8/lib/gruff/mini/bar.rb diff --git a/lib/gruff-0.2.8/lib/gruff/mini/bar.rb b/lib/gruff-0.2.8/lib/gruff/mini/bar.rb new file mode 100644 index 0000000..6410d68 --- /dev/null +++ b/lib/gruff-0.2.8/lib/gruff/mini/bar.rb @@ -0,0 +1,32 @@ +## +# +# Makes a small bar graph suitable for display at 200px or even smaller. +# +module Gruff + module Mini + + class Bar < Gruff::Bar + + include Gruff::Mini::Legend + + def draw + @hide_legend = true + @hide_title = true + @hide_line_numbers = true + + @marker_font_size = 50.0 + @minimum_value = 0.0 + @legend_font_size = 60.0 + + expand_canvas_for_vertical_legend + + super + + draw_vertical_legend + @d.draw(@base_image) + end + + end + + end +end