Line chart with multiple dropdowns
✓ Published4🌍 Public
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 descriptionMIT Licensed