Skip to main content
Public

Share visualization

Loading preview…

Fork of Fork of Selecting a Year on a Line Chart

vizhub.com

Shared links may look like this on X, LinkedIn, Slack, and Discord.

Before sharing, review the publishing checklist.

Choose how to deliver this visualization

LinkedIn caption

LinkedIn may not keep text supplied by the share sheet. Copy the caption and paste it into the post if needed. You can tag the VizHub company page when posting.

More options

Embed on a websiteCopy iframe embed code
Download & exportPNG, HTML, source ZIP

Fork of Fork of Selecting a Year on a Line Chart

1
Cchandanagandla
Last edited Apr 8, 2023
Created on Apr 8, 2023

This interactive line chart shows United Nations population estimates and projections for world regions from 1950 to 2100. Users can move the mouse across the chart to select a year, triggering a vertical line to update and re-render the visualization. Built with D3 v5, the code uses `d3.nest` to group data by region, `d3.line` with `curveBasis` for smoothed paths, and scales like `scaleTime` and `scaleLinear`. The data is loaded from two CSV files via `d3.csv` and processed with custom melting logic.

AI-generated description

Comments

Sign in to join the discussion.

MIT Licensed