diff options
author | Marvin Borner | 2020-11-05 20:01:09 +0100 |
---|---|---|
committer | Marvin Borner | 2020-11-05 20:01:09 +0100 |
commit | 50f973d67af54cf52dbdc64e98b33ccd3cd8210e (patch) | |
tree | 27087460ca470fec97f481771b5d6d4950169c8a /admin/public | |
parent | c4431482a0aa209e0091b759e4977f2398a20fdc (diff) |
Public vote stats
Diffstat (limited to 'admin/public')
-rw-r--r-- | admin/public/votes.js | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/admin/public/votes.js b/admin/public/votes.js index 62ff374..1bde08b 100644 --- a/admin/public/votes.js +++ b/admin/public/votes.js @@ -1,11 +1,11 @@ let date; let chart; -fetch("api/votes") +fetch("/admin/api/votes") .then((response) => response.json()) .then((response) => { data = response; - render("bar"); + render("pie"); }); function render(type) { @@ -42,7 +42,7 @@ function render(type) { } let index = 0; -const types = ["pie", "doughnut", "polarArea", "radar", "line", "bar"]; +const types = ["doughnut", "bar", "polarArea", "radar", "line", "pie"]; document.getElementById("switch").addEventListener("click", () => { chart.destroy(); render(types[index]); |