Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

A5 Line Chart D3

Public visualization

A5 Line Chart D3

0 stars3🌍 Public
EEric Yao
Last edited Feb 26, 2024
Created on Feb 26, 2024
Forked from A4 Barchart D3

This line chart displays the percentage of smokers in the United States from 1980 to 2012, comparing total, male, and female rates over time. It uses d3.csv to load data from smokersus.csv, d3.scaleBand and d3.scaleLinear for axes, and d3.line to generate three separate paths for each demographic group. Circles are drawn using SVG circle elements with hover tooltips created via appended title tags. The chart is rendered as an SVG element sized to the window dimensions, with color-coded points and lines for each category.

AI-generated description

Used my old Bar Chart Visualization.

The csv file doesn't quite make sense as the percentage of total smokers should not be less than the percentage of both male and female smokers.

Comments

Sign in to join the discussion.

MIT Licensed