Selecting a year on a line chart
✓ Published0🌍 Public
This visualization shows world population trends over time across regions, with a vertical line marking a selected year. Users can move their mouse across the chart to update the selected year, which highlights the corresponding point in time. The code uses d3.line, d3.scaleTime, d3.scaleLinear, and d3.axisBottom to render the SVG line chart, while d3.mouse captures interactive hover events. Population data comes from UN estimates (1950-2014) and medium variant projections (2015-2100), processed via d3.csv and d3.nest.
AI-generated descriptionMIT Licensed