Skip to content

Commit 312e53d

Browse files
author
Bot
committed
fix mixed chart wpm and interval datasets
1 parent aac3668 commit 312e53d

File tree

3 files changed

+4
-5
lines changed

3 files changed

+4
-5
lines changed

src/App.vue

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,6 @@ export default {
5151
5252
this.$store.commit('ADD_TRACKED_CONTAINER', this.$refs.navLeft);
5353
}
54-
console.log('mounted');
5554
5655
window.addEventListener('resize', () => {
5756
this.innerWidth = window.innerWidth;

src/components/CodeEditor.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -595,7 +595,7 @@ export default {
595595
});
596596
},
597597
async completed(devStats = false) {
598-
if (this.$route.path === '/results' || (!devStats && !this.codeInfo.fileIndex !== -1 && this.stats.history.length < 10)) {
598+
if (this.$route.path === '/results' || (!devStats && this.codeInfo.fileIndex !== -1 && this.stats.history.length < 10)) {
599599
// TODO: disable Finish now button in Run component
600600
return;
601601
}

src/components/charts/MixedChart.vue

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -34,15 +34,15 @@ export default {
3434
const oneThirdWPM = this.stats.oneThirdCharsCount / oneThirdTime * 60 / 5;
3535
3636
const halfCharsCount = this.stats.codeInfo.length - this.stats.oneThirdCharsCount - this.stats.lastThirdCharsCount;
37-
const halfTime = this.format(this.stats.lastThirdStartTime - this.stats.oneThirdTime, 2, 1);
37+
const halfTime = this.format(this.stats.lastThirdStartTime - this.stats.oneThirdTime);
3838
const halfWPM = halfCharsCount / halfTime * 60 / 5;
3939
4040
const lastThirdTime = this.format(this.stats.timeFromFirstInput - this.stats.lastThirdStartTime);
4141
const lastThirdWPM = this.stats.lastThirdCharsCount / lastThirdTime * 60 / 5;
4242
4343
return [
4444
{ x: 0, y: this.format(oneThirdWPM, 1, 1) },
45-
{ x: this.format(this.stats.timeFromFirstInput / 2, 0, 1), y: this.format(halfWPM) },
45+
{ x: this.format(this.stats.timeFromFirstInput / 2, 0, 1), y: this.format(halfWPM, 1, 1) },
4646
{ x: this.stats.timeFromFirstInput, y: this.format(lastThirdWPM, 1, 1) },
4747
];
4848
},
@@ -74,7 +74,7 @@ export default {
7474
callbacks: {
7575
title: ([item]) => {
7676
if (item.datasetIndex !== 0) {
77-
const event = this.history[item.index];
77+
const event = this.history[item.index + 1];
7878
7979
8080
const buffer = [`${event.type === 'mistake' ? 'Wrong' : 'Correct'}: ${event.text.replace(' ', 'Space')}`];

0 commit comments

Comments
 (0)