🌍 Public
Viewing a saved revision (read-only)
28376c3910b745759ab01642c196881d
Line chart with multiple dropdowns
This example displays two line charts comparing Olympic medal counts over time for two countries selected from dropdown menus. The visualization uses D3’s `scalePoint` and `scaleLinear` for axes, `flatGroup` to organize data by country, and an ordinal color scale from `schemeSet2` to distinguish the lines. Dropdown menus are populated from the `yearlyData` dataset, and changes trigger redraws via the `viz` function. The chart includes a gray inner rectangle and axes rendered using the `@curran/responsive-axes` library.
AI-generated description