Sort chart by Majority Judgment
This commit is contained in:
parent
d44c3b6f0b
commit
174a4c4d79
1 changed files with 1 additions and 1 deletions
|
|
@ -75,7 +75,7 @@ data = []
|
|||
colors = []
|
||||
settings.values.reverse.each do |v|
|
||||
d = { name: v[:label], data: [] }
|
||||
@vote.candidates.each do |c|
|
||||
@vote.candidates.sort { |a, b| a.mj <=> b.mj }.reverse.each do |c|
|
||||
d[:data] << [c.name, c.mj.count[v[:id]]]
|
||||
end
|
||||
data << d
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue