Module: BarChart
- Defined in:
- lib/chart_helpers/common/bar_chart.rb
Instance Method Summary collapse
- #horizontal_bar_chart(data, element = '.horizontal_bar_chart') ⇒ Object
- #vertical_bar_chart(data_url, element = '.vertical_bar_chart') ⇒ Object
Instance Method Details
#horizontal_bar_chart(data, element = '.horizontal_bar_chart') ⇒ Object
3 4 5 6 |
# File 'lib/chart_helpers/common/bar_chart.rb', line 3 def ( data, element='.horizontal_bar_chart' ) HorizontalBarChartGenerator.new.generate( element, data ) content_tag( :div, '', class: "#{element[1..-1]}" ) end |
#vertical_bar_chart(data_url, element = '.vertical_bar_chart') ⇒ Object
8 9 10 11 |
# File 'lib/chart_helpers/common/bar_chart.rb', line 8 def ( data_url, element='.vertical_bar_chart' ) VerticalBarChartGenerator.new.generate( element, data_url ) content_tag( :div, '', class: "#{element[1..-1]}" ) end |