Skip to main content
Public

Share visualization

Loading preview…

Line Chart with D3

vizhub.com

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

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 & exportHTML, source ZIP

Line Chart with D3

0 stars1Public
OOlha
Last edited Sep 3, 2026
Created on Mar 1, 2022

This example visualizes abortion rates for 15-17-year-olds across eight U.S. states from 1985 to 2017 as a multi-series line chart, with each state distinguished by a color-coded ordinal scale and a d3-legend. It renders using SVG with animated tooltips on circular data points that display the year, state, and rate on mouseover. The visualization is built with D3 v7, using d3.group for data nesting, d3.line for path generation, d3.scaleLinear for axes, and d3.axisBottom/Left for tick marks, drawing from CSV data loaded via d3.csv.

AI-generated description

Assignment 5 part B

Line Chart with D3

Inspired by:

And by documentation:

Tooltip shifting: for unknown reason vizhub shows tooltip shifted to the left, but locally in Chrome and Safari browsers tooltips work fine, I suspect there may be a bug in vizhub. If there is a valid explanation, please share!

Comments

Sign in to join the discussion.

MIT Licensed