Class: StreamgraphGenerator

Inherits:
BaseGenerator show all
Defined in:
lib/chart_generators/streamgraph_generator.rb

Instance Method Summary collapse

Methods inherited from BaseGenerator

#add_assets, #css_code, #js_code

Instance Method Details

#generate(element, data_url) ⇒ Object

generate horizontal bar chart

element - div id or class for chart
data_url - csv file with data


6
7
8
9
# File 'lib/chart_generators/streamgraph_generator.rb', line 6

def generate( element, data_url )
  add_assets( "#{element[1..-1]}"+'.js', js_code( element, data_url ) )
  add_assets( "#{element[1..-1]}"+'.scss', css_code( element ) )   
end