fix: Fix syntax error in heatmap color range definition

Removes extraneous parenthesis causing syntax error in the
concatenation of color range, ensuring proper display
of heatmap colors.
This commit is contained in:
Kumi 2024-11-28 16:03:51 +01:00
parent 7875b842df
commit 6abffe5d25
Signed by: kumi
GPG key ID: ECBCC9082395383F

View file

@ -9,7 +9,7 @@ fetch("/mood/statistics/heatmap/values/")
const end = new Date(); const end = new Date();
var domain = Object.keys(moodOptions).map((key) => Number(key)); var domain = Object.keys(moodOptions).map((key) => Number(key));
const range = ["#ffffd4"].concat(domain.map((key) => moodOptions[key]["color"]))); const range = ["#ffffd4"].concat(domain.map((key) => moodOptions[key]["color"]));
domain = [-Infinity].concat(domain).concat([Infinity]); domain = [-Infinity].concat(domain).concat([Infinity]);
fetch("/mood/statistics/heatmap/?start=" + start.toISOString().split("T")[0] + "&end=" + end.toISOString().split("T")[0]) fetch("/mood/statistics/heatmap/?start=" + start.toISOString().split("T")[0] + "&end=" + end.toISOString().split("T")[0])