🌍 Public
A5 Line Chart 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 descriptionUsed 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.
MIT Licensed
Comments
Sign in to join the discussion.