Skip to main content
Public

Share visualization

Loading preview…

Selecting a year of 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

Selecting a year of a line chart

0
YYedrup
Last edited Mar 29, 2020
Created on Mar 29, 2020

This interactive line chart visualizes population estimates for global regions from 1950 to 2100, combining data from two UN CSV files. A vertical black line marks the currently selected year, which updates when the user hovers over the plot area, prompting a re-render through a state-setting callback. The visualization uses D3.js v5 to scale time and linear axes, render multi-line paths with a basis curve, and display a categorical color legend. The SVG output includes axis tick marks, labels, and a title, all styled via CSS.

AI-generated description

Comments

Sign in to join the discussion.

MIT Licensed