Class: Gruff::Mini::Bar
- Inherits:
-
Bar
- Object
- Base
- Bar
- Gruff::Mini::Bar
- Defined in:
- lib/gruff/mini/bar.rb,
sig/generated/gruff/mini/bar.rbs
Overview
Makes a small bar graph suitable for display at 200px or even smaller.
Here's how to set up a Gruff::Mini::Bar.
g = Gruff::Mini::Bar.new
g.title = 'Mini Bar Graph'
g.data :Art, [0, 5, 8, 15]
g.data :Philosophy, [10, 3, 2, 8]
g.data :Science, [2, 15, 8, 11]
g.write('mini_bar.png')
Instance Method Summary collapse
Instance Method Details
#draw_graph ⇒ void
This method returns an undefined value.
42 43 44 45 |
# File 'lib/gruff/mini/bar.rb', line 42 def draw_graph super draw_vertical_legend # steep:ignore end |
#initialize_attributes ⇒ void
This method returns an undefined value.
22 23 24 25 26 27 28 29 30 31 32 33 |
# File 'lib/gruff/mini/bar.rb', line 22 def initialize_attributes super @hide_legend = true @hide_title = true @hide_line_numbers = true @marker_font.size = 50.0 @legend_font.size = 50.0 @minimum_value = 0.0 end |
#setup_data ⇒ void
This method returns an undefined value.
36 37 38 39 |
# File 'lib/gruff/mini/bar.rb', line 36 def setup_data # steep:ignore super end |