🌍 Public
Viewing a saved revision (read-only)
36b1a38f11ad4db4bc58564976ddf2a6
Using CSS Variables in JS
This interactive scatter plot demonstrates dynamic theme switching through CSS variables. A menu lets users toggle between three color palettes—ggplot, Tableau 10, and BBC Primary—with selections persisted via localStorage. D3’s `select`, `join`, and event handlers render six circles positioned from static data, while `getComputedStyle` reads the active theme’s CSS custom properties to update fill colors on each theme change.
AI-generated description