use bigger image for stats and remove text
parent
602f8a0184
commit
a66821f0e7
|
@ -2,9 +2,9 @@ module Merb
|
|||
module VotesHelper
|
||||
def stat_chart
|
||||
curl = Gchart.pie(
|
||||
:size => '300x200',
|
||||
:title => "Voting results for #{@user.votes.size} photos",
|
||||
:legend => [ 'Not One', 'One' ],
|
||||
:size => '415x275',
|
||||
:title => "Voting results for #{@user.votes.size} photos. Oneness #{"%.1f%%" % (@user.votes.select { |v| v.one? }.size.to_f / @user.votes.size.to_f * 100.0)}",
|
||||
:legend => [ "Not One (#{@user.votes.select { |v| v.zero? }.size})", "One (#{@user.votes.select { |v| v.one? }.size})" ],
|
||||
:data => [ @user.votes.select { |v| v.zero? }.size, @user.votes.select { |v| v.one? }.size ],
|
||||
:theme => :pastel
|
||||
)
|
||||
|
|
|
@ -11,10 +11,4 @@
|
|||
%div.user_stat_chart
|
||||
= stat_chart
|
||||
|
||||
%p== <strong>Zero:</strong> <tt>#{@user.votes.select { |v| v.zero? }.size}</tt>
|
||||
|
||||
%p== <strong>One:</strong> <tt>#{@user.votes.select { |v| v.one? }.size}</tt>
|
||||
|
||||
%p== <strong>Oneness:</strong> <tt>#{"%.1f%%" % (@user.votes.select { |v| v.one? }.size.to_f / @user.votes.size.to_f * 100.0)}</tt>
|
||||
|
||||
%br{ :style => 'clear: both' }
|
||||
|
|
Reference in New Issue