Class: LineChartGenerator
- Inherits:
-
BaseGenerator
- Object
- BaseGenerator
- LineChartGenerator
- Defined in:
- lib/chart_generators/line_chart_generator.rb
Instance Method Summary collapse
-
#generate(element, data) ⇒ Object
generate horizontal bar chart element - div id or class for chart data - file with [ X , Y ] data table.
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 - file with [ X , Y ] data table
6 7 8 9 |
# File 'lib/chart_generators/line_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 |