made sure both raw and wpm use the same axis scale

This commit is contained in:
Jack 2020-05-31 15:18:39 +01:00
parent a931107f3b
commit 56c5fd8512

View file

@ -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 = [];