diff --git a/frontend/static/js/result.js b/frontend/static/js/result.js index 6fb9684..b69b820 100644 --- a/frontend/static/js/result.js +++ b/frontend/static/js/result.js @@ -28,7 +28,7 @@ function domLoaded() { drawChart = data => { chart.draw( google.visualization.arrayToDataTable( - [["Options", "Votes"]].concat(data) + [["Options", "Votes"]].concat(data.sort((a, b) => b[1] - a[1])) ), chartOptions ); chartEl.style.visibility = "visible";