Fork of Selecting a Year on a Line Chart
✓ Published0🌍 Public
This interactive line chart displays population estimates by region from 1950 to 2100, sourced from UN population data. Users can hover over the chart to select a specific year, which updates a vertical line marker and re-orders the color-coded legend. The visualization uses d3.scaleTime, d3.scaleLinear, d3.line with curveBasis, d3.nest, and d3.mouse to handle interactions. A color legend built with custom D3 code lists regions using d3.scaleOrdinal and d3.schemeCategory10, while axes and labels are rendered as SVG elements.
AI-generated descriptionMIT Licensed