diff --git a/frontend/analytics.html b/frontend/analytics.html index 955ca6a..4cb2337 100644 --- a/frontend/analytics.html +++ b/frontend/analytics.html @@ -439,7 +439,8 @@ Попыток `; hardQuestions.forEach((q, i) => { - const errPct = Math.round((q.errorRate || 0) * 100); + // errorRate приходит из API уже в процентах (0–100), не умножаем повторно + const errPct = Math.round(q.errorRate || 0); const errCls = errPct >= 60 ? 'hq-pct-hi' : errPct >= 35 ? 'hq-pct-mid' : 'hq-pct-lo'; const diffLabel = q.difficulty === 1 ? 'Лёгкий' : q.difficulty === 2 ? 'Средний' : 'Сложный'; const diffCls = q.difficulty === 1 ? 'diff-1' : q.difficulty === 2 ? 'diff-2' : 'diff-3';