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 112 forks source link

perf: use another, faster charts library - echarts #319

Closed ivan-aksamentov closed 2 years ago

ivan-aksamentov commented 2 years ago

Reimplements charts using echarts instead of recharts.

eharts is based on HTML5 canvas (as opposed to SVG in recharts), and should render much faster.

As a bonus, echarts supports pan&zoom and many other features.

vercel[bot] commented 2 years ago

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated
covariants ✅ Ready (Inspect) Visit Preview Jul 19, 2022 at 3:36PM (UTC)
emmahodcroft commented 2 years ago

Hi @ivan-aksamentov I'm sorry for such a delay here! I've just tried this out for Per Country and it's AMAZING. It's so smooth, looks so good, and I love that the overlay boxes are shorter! I ALSO LOVE THE ZOOMING!!!

I actually think this is almost great as it is, but we would need to add counts to the mouse-over-box (as currently shows on Per Country).

Optionally it would be super cool to know how possible the following would be:

I'm super excited by this! I assume we could also extend to Per Variant & Cases?

emmahodcroft commented 2 years ago

Oh - there is also one small issue - the colors don't seem to be matching up in the mouse-over 🙃

image

(Actual colors: image

)

ivan-aksamentov commented 2 years ago
richardgoater commented 2 years ago

Screenshot 2022-07-23 14 50 33 Hi folks! Just checking this out and I think the dots are still different colours? I could be wrong.

emmahodcroft commented 2 years ago

Good catch @richardgoater - it looks like at least the mouseover legend matches the plot now, but you're right that the dots aren't matching. For me this is a little less critical - I'd be ok if they were just black/grey/neutral colour (if that's easier) - or if they matched. But having them coloured but not matching is a bit odd!

emmahodcroft commented 2 years ago

This makes me sad because of the zooming. :(

richardgoater commented 2 years ago

I will implement zooming soon! 🙏🏽