debug: Add debugging logs for domain and range arrays
Includes console logs to output the domain and range arrays during the heatmap data retrieval. This helps in debugging by providing visibility into the data structure used for the heatmap color mapping. Refines date range object to avoid redundancy.
This commit is contained in:
parent
54be38232f
commit
2f1cdd2de1
1 changed files with 4 additions and 1 deletions
|
@ -12,6 +12,9 @@ fetch("/mood/statistics/heatmap/values/")
|
|||
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) => {
|
||||
|
@ -37,7 +40,7 @@ fetch("/mood/statistics/heatmap/values/")
|
|||
}
|
||||
},
|
||||
date: {
|
||||
start: start, // Start from one year ago
|
||||
start: start,
|
||||
},
|
||||
range: 13, // Display 13 months so that the current month is included
|
||||
domain: {
|
||||
|
|
Loading…
Reference in a new issue