Class: HorizontalBarChartGenerator
- Inherits:
-
BaseGenerator
- Object
- BaseGenerator
- HorizontalBarChartGenerator
- Defined in:
- lib/chart_generators/bar_chart_generator.rb
Instance Method Summary collapse
-
#generate(element, data) ⇒ Object
generate horizontal bar chart element - div id or class for chart data - array with chart’s points.
Methods inherited from BaseGenerator
#add_assets, #css_code, #js_code
Instance Method Details
#generate(element, data) ⇒ Object
generate horizontal bar chart
element - div id or class for chart
data - array with chart's points
6 7 8 9 |
# File 'lib/chart_generators/bar_chart_generator.rb', line 6 def generate( element, data ) add_assets( "#{element[1..-1]}"+'.js', js_code( element, data ) ) add_assets( "#{element[1..-1]}"+'.scss', css_code( element ) ) end |