Sha256: fb604b5a947604aa6377509ed44813e9362198e6c97c02b93c9a1ca3d5d5dc85

Contents?: true

Size: 526 Bytes

Versions: 3

Compression:

Stored size: 526 Bytes

Contents

##
#
# 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 = 40.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

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
gruff-0.2.6 lib/gruff/mini/bar.rb
gruff-0.2.5 lib/gruff/mini/bar.rb
gruff-0.2.7 lib/gruff/mini/bar.rb