Closed tomasmartbert closed 5 months ago
Fixed for static facet plot in report (including fix for #277 WIP):
Remaining issue The interactive plot should dynamically adjust the y-axis according to data shown. I'll explore a more plotly-based solution for the rectangle background.
Nice work!
Describe the Bug
The light-blue background on the time series plot demarcating the signal detection period is sometimes not covering the full vertical space in the coordinate system.
Currently, it is the non-stratified max weekly case numbers which determines the top edge of a rectangle making up the background, which in many cases is clipped to nicely fit the actual data window. The bug is most obviously seen from the ggplot2-facet plot in the non-interactive Report, see screen shot: Since implicit one-year filtering is applied here, there is a smaller chance that any case number is high enough relative to the threshold line to make the background appear good-looking on all facets: The thresholds are way above the case numbers.
It also possible, using input data with a decreasing case number trend over time, to have the interactive plot appear to have a too tall y-axis resulting in data looking squashed towards the x-axis.
Solution
The top edge of the background rectangle should be determined from the highest of case numbers and signal thresholds, and additionally adapt dynamically to the zoomed dates on the interactive plot.
To Reproduce
Steps to reproduce the behavior:
Expected Behavior
The blue background colour ought to cover up the whole vertical space.
Screenshots / Code Snippets (if applicable) Here are shown the simulated example input data:
If applicable, add screenshots, code snippets, or logs to help explain your problem.
Environment (please complete the following information):
Additional Context
Add any other context about the problem here.