<% max_total = @platforms.inject(0) {|m,a| a[:total].to_i > m ? a[:total].to_i : m }%>

<% i=1; @platforms.each do |platform| width=((platform[:total].to_f/max_total)*200).round; width = 1 if width < 1 %> <% i+=1; end %>
# Hits Operating System Percentage
<%= i %> <%= platform[:total] %> <%= platform[:name] %> <%= sprintf("%000.2f",(platform[:total].to_f/@total_hits)*100) %>% <%=image_tag 'sitealizer/bar.gif', :width => width, :height => 3%>