# 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 high_graph_stock(placeholder,object , &block).concat(content_tag("div","", object.html_options)) end def high_graph(placeholder, object, &block) graph =<<-EOJS EOJS if defined?(raw) return raw(graph) else return graph end end def high_graph_stock(placeholder, object, &block) graph =<<-EOJS EOJS if defined?(raw) return raw(graph) else return graph end end end end