mirror of
https://github.com/monkeytypegame/monkeytype.git
synced 2025-03-11 06:05:16 +08:00
fixed pb not showing up
This commit is contained in:
parent
2e59cda3f8
commit
f1aa40766f
1 changed files with 5 additions and 8 deletions
|
@ -1627,15 +1627,12 @@ function showResult(difficultyFailed = false) {
|
|||
}
|
||||
localPb = true;
|
||||
}
|
||||
if (highestwpm > 0) {
|
||||
wpmOverTimeChart.options.annotation.annotations[0].value = highestwpm;
|
||||
if (lpb > 0) {
|
||||
wpmOverTimeChart.options.annotation.annotations[0].value = lpb;
|
||||
wpmOverTimeChart.options.annotation.annotations[0].label.content =
|
||||
"PB: " + highestwpm;
|
||||
if (
|
||||
maxChartVal >= highestwpm - 15 &&
|
||||
maxChartVal <= highestwpm + 15
|
||||
) {
|
||||
maxChartVal = highestwpm + 15;
|
||||
"PB: " + lpb;
|
||||
if (maxChartVal >= lpb - 15 && maxChartVal <= lpb + 15) {
|
||||
maxChartVal = lpb + 15;
|
||||
}
|
||||
wpmOverTimeChart.options.scales.yAxes[0].ticks.max = Math.round(
|
||||
maxChartVal
|
||||
|
|
Loading…
Reference in a new issue