diff --git a/lib/lazy_high_charts/layout_helper.rb b/lib/lazy_high_charts/layout_helper.rb index 6083a6e..43e61ce 100644 --- a/lib/lazy_high_charts/layout_helper.rb +++ b/lib/lazy_high_charts/layout_helper.rb @@ -1,13 +1,13 @@ # coding: utf-8 module LazyHighCharts module LayoutHelper - + def high_chart(placeholder, object , &block) object.html_options.merge!({:id=>placeholder}) object.options[:chart][:renderTo] = placeholder high_graph(placeholder,object , &block).concat(content_tag("div","", object.html_options)) end - + def high_stock(placeholder, object , &block) object.html_options.merge!({:id=>placeholder}) object.options[:chart][:renderTo] = placeholder @@ -29,26 +29,26 @@ def build_html_output(type, placeholder, object, &block) options_collection << "#{k}: #{object.options[key].to_json}" end options_collection << "series: #{object.data.to_json}" - + graph =<<-EOJS + }; + EOJS - + if defined?(raw) return raw(graph) else return graph end - + end end end