owid / owid-grapher

A platform for creating interactive data visualizations
https://ourworldindata.org
MIT License
1.35k stars 227 forks source link

enhance: initialize color schemes lazily #3741

Open marcelgerber opened 4 days ago

marcelgerber commented 4 days ago

I realized that this code, also, always runs. On every pageload, whenever a node script is run, etc., we load all the color schemes, even though we mostly ever just need one.

While working on it, I also realized that we have three color schemes that don't exist (i.e. there's no color information for them): hsv-RdBu, hsv-CyMg, ContinentsLines. I removed them (thankfully, they're not contained in any chart config).

owidbot commented 4 days ago
Quick links (staging server): Site Admin Wizard

Login: ssh owid@staging-site-lazy-color-schemes

SVG tester: Number of differences (default views): 0 ✅ Number of differences (all views): 0 ✅

Edited: 2024-06-25 10:30:04 UTC Execution time: 1.19 seconds