Skip to content

Commit 47cbbd9

Browse files
committed
updated chart tooltips
1 parent 3d6f45e commit 47cbbd9

1 file changed

Lines changed: 9 additions & 3 deletions

File tree

public/js/script.js

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -999,7 +999,6 @@ $(document).keypress(function(event) {
999999
currentKeypressCount = 0;
10001000
errorsPerSecond.push(currentErrorCount);
10011001
currentErrorCount = 0;
1002-
console.log(errorsPerSecond);
10031002
if(keypressPerSecond[time-1] == 0 && keypressPerSecond[time-2] == 0 && !afkDetected){
10041003
showNotification("AFK detected",3000);
10051004
afkDetected = true;
@@ -1189,9 +1188,13 @@ let wpmOverTimeChart = new Chart(ctx, {
11891188
},
11901189
responsive: true,
11911190
maintainAspectRatio: false,
1191+
tooltips: {
1192+
mode: 'x',
1193+
intersect: false
1194+
},
11921195
hover: {
1193-
mode: 'nearest',
1194-
intersect: true
1196+
mode: 'x',
1197+
intersect: false
11951198
},
11961199
scales: {
11971200

@@ -1231,6 +1234,9 @@ let wpmOverTimeChart = new Chart(ctx, {
12311234
precision:0,
12321235
fontFamily: 'Roboto Mono',
12331236
beginAtZero: true
1237+
},
1238+
gridLines: {
1239+
display:false
12341240
}
12351241
}
12361242
]

0 commit comments

Comments
 (0)