lib/seer/bar_chart.rb in seer-0.4.0 vs lib/seer/bar_chart.rb in seer-0.5.0

- old
+ new

@@ -7,11 +7,11 @@ # @data = Widgets.all # Must be an array, and must respond # # to the data method specified below (in this example, 'quantity') # # In your view: # - # <div id="chart" class="chart"></div> + # <div id="chart"></div> # # <%= Seer::visualize( # @widgets, # :as => :bar_chart, # :in_element => 'chart', @@ -98,10 +98,10 @@ var data = new google.visualization.DataTable(); #{data_columns} #{data_table.to_s} var options = {}; #{options} - var container = document.getElementById('chart'); + var container = document.getElementById('#{self.chart_element}'); var chart = new google.visualization.BarChart(container); chart.draw(data, options); } </script> }