Fix DR not being in percent in the forgetting curve (#4024)

* FIX DR not displayed as % in forgetting curve

* Run ./check and fix errors found by it

* Round DR to full number
This commit is contained in:
GithubAnon0000 2025-05-22 12:54:35 +00:00 committed by GitHub
parent d39284e101
commit ec513dfde7
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -339,8 +339,11 @@ export function renderForgettingCurve(
1,
);
let text = tooltipText(d);
const desiredRetentionPercent = desiredRetention * 100;
if (y2 >= lineY - 10 && y2 <= lineY + 10) {
text += `<br>${tr.cardStatsFsrsForgettingCurveDesiredRetention()}: ${desiredRetention.toFixed(2)}`;
text += `<br>${tr.cardStatsFsrsForgettingCurveDesiredRetention()}: ${
desiredRetentionPercent.toFixed(0)
}%`;
}
showTooltip(text, x1, y1);
})