Class: RubyCharts::Charts::BarChart
- Defined in:
- lib/ruby_charts/charts/bar_chart.rb
Constant Summary
Constants inherited from BaseChart
RubyCharts::Charts::BaseChart::COLORS
Instance Attribute Summary
Attributes inherited from BaseChart
Instance Method Summary collapse
- #horizontal! ⇒ Object
-
#initialize(data, orientation = :vertical) ⇒ BarChart
constructor
A new instance of BarChart.
- #vertical! ⇒ Object
Methods inherited from BaseChart
#colors, #font, #legend, #render, #save, #subtitle, #title
Constructor Details
#initialize(data, orientation = :vertical) ⇒ BarChart
Returns a new instance of BarChart.
6 7 8 9 |
# File 'lib/ruby_charts/charts/bar_chart.rb', line 6 def initialize(data, orientation = :vertical) super(data) @orientation = orientation end |
Instance Method Details
#horizontal! ⇒ Object
11 12 13 14 |
# File 'lib/ruby_charts/charts/bar_chart.rb', line 11 def horizontal! @orientation = :horizontal self end |
#vertical! ⇒ Object
16 17 18 19 |
# File 'lib/ruby_charts/charts/bar_chart.rb', line 16 def vertical! @orientation = :vertical self end |