mirror of
https://github.com/monkeytypegame/monkeytype.git
synced 2025-11-09 13:44:29 +08:00
made sure both raw and wpm use the same axis scale
This commit is contained in:
parent
a931107f3b
commit
56c5fd8512
1 changed files with 9 additions and 0 deletions
|
|
@ -665,6 +665,15 @@ function showResult(difficultyFailed = false) {
|
|||
wpmOverTimeChart.data.datasets[1].data = rawHistory;
|
||||
|
||||
|
||||
let maxVal = 0;
|
||||
rawHistory.forEach(raw =>{
|
||||
if(raw >= maxVal){
|
||||
maxVal = raw;
|
||||
}
|
||||
})
|
||||
wpmOverTimeChart.options.scales.yAxes[0].ticks.max = maxVal;
|
||||
wpmOverTimeChart.options.scales.yAxes[1].ticks.max = maxVal;
|
||||
|
||||
|
||||
let errorsNoZero = [];
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue