davidbau / covid-19-chart

Chart of current COVID-19 time series data. Enables a variety of county- state- and nation-level comparisons and data exploration.
https://covid19chart.org/
18 stars 4 forks source link

Stable colors #24

Closed davidebbo closed 4 years ago

davidebbo commented 4 years ago

This is my attempt at what we discussed. It ended up being a bit more logic than I expected. I put a number of comments, so hopefully it's clear what it's trying to do.

davidbau commented 4 years ago

OK cool! Thanks for the detailed explanation, I get it now!

davidbau commented 4 years ago

Merged!

As a result of the change, there is a slight flash in colors when switching modes. Do you notice it too?

davidebbo commented 4 years ago

I didn't notice it, but now that you mention it, I do. I understand why it's happening: up change the styles while old chart is still displayed, so that affects it before the new chart gets displayed. Let me think about that, there may be an alternate implementation that doesn't require this css overwriting hack. I'll come back to it tonight and propose something on the issue thread.