From ec513dfde7fdad577164d10757e2567937d79a2d Mon Sep 17 00:00:00 2001
From: GithubAnon0000 <160563432+GithubAnon0000@users.noreply.github.com>
Date: Thu, 22 May 2025 12:54:35 +0000
Subject: [PATCH] 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
---
ts/routes/card-info/forgetting-curve.ts | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/ts/routes/card-info/forgetting-curve.ts b/ts/routes/card-info/forgetting-curve.ts
index 714032958..c2a9f2580 100644
--- a/ts/routes/card-info/forgetting-curve.ts
+++ b/ts/routes/card-info/forgetting-curve.ts
@@ -339,8 +339,11 @@ export function renderForgettingCurve(
1,
);
let text = tooltipText(d);
+ const desiredRetentionPercent = desiredRetention * 100;
if (y2 >= lineY - 10 && y2 <= lineY + 10) {
- text += `
${tr.cardStatsFsrsForgettingCurveDesiredRetention()}: ${desiredRetention.toFixed(2)}`;
+ text += `
${tr.cardStatsFsrsForgettingCurveDesiredRetention()}: ${
+ desiredRetentionPercent.toFixed(0)
+ }%`;
}
showTooltip(text, x1, y1);
})