Conversion Rates
<%= chart("analysis_graph#{@metric.id}",
{ "Served" => { :collection => @rates[:served], :x => :variant_type, :y => :value },
"Conversions" => { :collection => @rates[:conversions], :x => :variant_type, :y => :value } },
{ :xaxis => {:autoscaleMargin => 0.1, :ticks => @rates[:titles].map { |i,t| [i + 0.5, t] }.sort }, :yaxis => { :min => 0, :minTickSize => 1 }, :bars => { :show => true }, :legend => { :position => "ne" } }, :placeholder_size => "300x200") %>
<%= chart("analysis_conv_graph#{@metric.id}",
{ "Conversion Rate (%)" => { :collection => @rates[:conversion_rates], :x => :variant_type, :y => :value } },
{ :xaxis => {:autoscaleMargin => 0.1, :ticks => @rates[:titles].map { |i,t| [i + 0.5, t] }.sort }, :yaxis => { :min => 0, :minTickSize => 1 }, :bars => { :show => true }, :legend => { :position => "ne" } }, :placeholder_size => "300x200") %>