Skip to content

Commit

Permalink
Fix R Value Display
Browse files Browse the repository at this point in the history
  • Loading branch information
frievoe97 committed Feb 3, 2025
1 parent 66d62b6 commit 5199b79
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 1 deletion.
6 changes: 6 additions & 0 deletions src/views/v1/RValuePlot.vue
Original file line number Diff line number Diff line change
Expand Up @@ -288,6 +288,12 @@ export default defineComponent({
},
},
]
// Ensure avg7dayLookup is updated when manually calculating R-values,
// so it remains available even if precomputed rValues are missing.
this.avg7dayLookup = {
date: susceptible.x.slice(this.lagDays * 2),
avgR: rValues,
}
},
},
})
Expand Down
8 changes: 7 additions & 1 deletion src/views/v2/RValuePlot.vue
Original file line number Diff line number Diff line change
Expand Up @@ -265,7 +265,6 @@ export default defineComponent({
// marker: { color: '#c44', size: 3 },
// },
]
// save the 7-day average so we can query it later for the summary stats
this.avg7dayLookup = { date: x.slice(center), avgR }
},
Expand Down Expand Up @@ -343,6 +342,13 @@ export default defineComponent({
},
},
]
// Ensure avg7dayLookup is updated when manually calculating R-values,
// so it remains available even if precomputed rValues are missing.
this.avg7dayLookup = {
date: susceptible.x.slice(this.lagDays * 2),
avgR: rValues,
}
},
},
})
Expand Down

0 comments on commit 5199b79

Please sign in to comment.