Skip to main content
100%

Selecting a Year on a Line Chart

✓ Published0🌍 Public
Jjeelong
Last edited Jul 19, 2020
Created on Jul 19, 2020

This visualization shows population trends over time for global regions, with a vertical line marking the currently selected year. Users can move the mouse across the chart to select a different year, updating the line’s position. The line chart uses d3.scaleTime, d3.scaleLinear, d3.line, and d3.curveBasis for rendering, while d3.nest groups data by region. A d3.Ordinal scale with schemeCategory10 colors each line, and a custom colorLegend component displays the categories. Data comes from UN population estimates and medium variant projections, processed with d3.csv and d3.timeParse.

AI-generated description

React Starter code.

MIT Licensed

Similar vizzes