# coding: utf-8 module LazyHighCharts module HighChartsHelper # ActiveSupport::JSON.unquote_hash_key_identifiers = false 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_graph(placeholder, object, &block) graph =<<-EOJS EOJS if defined?(raw) return raw(graph) else return graph end end end end