Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

Selecting a Year on a Line Chart

Public visualization

Selecting a Year on a Line Chart

0 stars0🌍 Public
WW9183907
Last edited May 9, 2020
Created on May 9, 2020

This visualization shows United Nations population projections from 1950 to 2100 for world regions as a multi-line chart. The year 2018 is initially marked by a vertical line, and moving the mouse across the chart updates the selected year, which moves the line and adjusts the highlighted point. The chart uses d3.line, d3.scaleTime, d3.scaleLinear, and d3.axisLeft/Bottom to render the SVG, with data from two CSV files melted into a single dataset. A d3.scaleOrdinal with schemeCategory10 colors each region, and a custom colorLegend component displays the categories.

AI-generated description

Comments

Sign in to join the discussion.

MIT Licensed