-
-
- pie = GruffGraff.new ( :graph_type => Gruff::Pie,
- :data => ,
- :title => "Percentage of First Plce Votes")
+ @election.plurality_result.points.each do |candidate, votes|
+ data[names[candidate]] = votes
+ end
+
+ pie = GruffGraff.new( :graph_type => Gruff::Pie,
+ :title => "Percentage of First Place Votes",
+ :data => data)
+ send_data(*pie.output)
+
+ end