Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

Fork of Line chart with multiple dropdowns

Public visualization

Viewing a saved revision (read-only)

5c7e27adf6f04a238ba7059c48f8bf4c

Fork of Line chart with multiple dropdowns

0 stars0🌍 Public
LLayaMyadam@my.unt.edu
Last edited Apr 26, 2024
Created on Apr 26, 2024

This chart displays a single line for one country across one variable, with two dropdown menus to select the country and the metric (life expectancy, CPI, or tax revenue). Built with D3 v7, it renders an SVG line chart using `d3.scaleBand`, `d3.scaleLinear`, `d3.axisBottom`, `d3.axisLeft`, and a `d3.line` path generator. The dropdowns are populated from static sample data, and a change event triggers the `update` function to redraw the line and axes.

AI-generated description