hodcroftlab / covariants

Real-time updates and information about key SARS-CoV-2 variants, plus the scripts that generate this information.
https://covariants.org/
GNU Affero General Public License v3.0
316 stars 111 forks source link

Render plot cursor above area segments on country plots #190

Closed ivan-aksamentov closed 3 years ago

ivan-aksamentov commented 3 years ago

Resolves #188

After #186 the cursor line became invisible because area segments on the plot are opaque:

image

This PR renders the <Tooltip/> components (which includes the cursor line) above area segments.

There is a new problem though. The "active circles" (the circles showing the value on the intersection of cursor line and area segment) are now partially obscured by area segments:

image2

This is due to them being rendered intertwined along with area segments, so that the previous circle is obscured by the next segment:

01

(note area and active-dot element ordering)

I am not sure we will be able to fix that easily.

vercel[bot] commented 3 years ago

This pull request is being automatically deployed with Vercel (learn more).
To see the status of your deployment, click below or on the icon next to each commit.

🔍 Inspect: https://vercel.com/hodcroftlab/covariants/BacbuDQf9Adq2kAFxGQXFNNzTshU
✅ Preview: https://covariants-git-fix-plot-cursor-hodcroftlab.vercel.app

emmahodcroft commented 3 years ago

Thank you @ivan-aksamentov ! The plan now is to merge this in, but continue to think about the problem more generally, including considering some ideas from #179 .