line.draw
send_data(line.to_blob, :disposition => 'inline', :type => 'image/png')
end
-
+
+ #will place votes in a fixed number of intervals, and shows votes over time
def votes_per_interval
@election = Election.find(params[:id])
data, labels = get_votes_per_interval_data(@election)
send_data(line.to_blob, :disposition => 'inline', :type => 'image/png')
end
+ def quickvote_bar
+ @election = Election.find(params[:id])
+ end
+
+ def borda_bar
+ @election = Election.find(params[:id])
+
+ #Get the list of candidates from the election, and calculate how RubyVote
+ #gave each one points
+ @election.candidates.each do |candidate|
+
+ #Tabulate how many points each candidate received
+ #Make the name of each candidate a label under the correspoding column
+ #done!
+ end
+
+
private
# generate the data and labels for each graph