diff --git a/mood/static/mood/dashboard.js b/mood/static/mood/dashboard.js index 85c81bd..0d16aee 100644 --- a/mood/static/mood/dashboard.js +++ b/mood/static/mood/dashboard.js @@ -8,13 +8,10 @@ fetch("/mood/statistics/heatmap/values/") const start = new Date(new Date().setFullYear(new Date().getFullYear() - 1)); const end = new Date(); - var domain = Object.keys(moodOptions); + var domain = Object.keys(moodOptions).map((key) => Number(key)); const range = ["#ffffd4"].concat(domain.map((key) => moodOptions[key]["color"])).concat(["#000000"]); domain = [0].concat(domain).concat([Infinity]); - console.log(domain); - console.log(range); - fetch("/mood/statistics/heatmap/?start=" + start.toISOString().split("T")[0] + "&end=" + end.toISOString().split("T")[0]) .then((response) => response.json()) .then((data) => {