debug: Adds debug logging for mood mapping
Introduces console logging to debug mood average mapping to the closest mood option key, aiding in verifying the calculation and understanding discrepancies.
This commit is contained in:
parent
3e4b68aa19
commit
c0fb79ed5c
1 changed files with 1 additions and 0 deletions
|
@ -24,6 +24,7 @@ fetch("/mood/statistics/heatmap/values/")
|
|||
y: d => {
|
||||
if (d.average) {
|
||||
const key = Object.keys(moodOptions).reduce((a, b) => Math.abs(a - d.average) < Math.abs(b - d.average) ? a : b);
|
||||
console.log(key, d.average, moodOptions[key]);
|
||||
return key;
|
||||
}
|
||||
return 0;
|
||||
|
|
Loading…
Reference in a new issue