fix(dashboard,api): show correct percentage on retention

This commit is contained in:
Carl-Gerhard Lindesvärd
2025-03-28 22:36:08 +01:00
parent e9133aa5a8
commit ecda9a7d1b
3 changed files with 7 additions and 8 deletions

View File

@@ -402,9 +402,7 @@ function processCohortData(
cohort_interval: row.cohort_interval,
sum,
values: values,
percentages: values.map((value) =>
sum > 0 ? round((value / sum) * 100, 2) : 0,
),
percentages: values.map((value) => (sum > 0 ? round(value / sum, 2) : 0)),
};
});