Skip to main content
100%

multi-line Chart in D3

✓ Published0🌍 Public
EEunice Tu
Last edited Mar 14, 2024
Created on Mar 11, 2024
Forked from D3 Starter

This multi-line chart visualizes the average daily cigarette consumption among smokers in the top five countries from 1980 to 2012, using data from the CORGIS smoking dataset. The chart displays five distinct colored lines, one per country, with dots marking individual yearly data points. Built with D3 v7, the visualization employs `d3.csv` to load data, `d3.group` to organize by country, and `d3.scaleLinear` for both axes. The color scale uses a ColorBrewer qualitative scheme, while the legend is generated using the d3-legend library's `d3.legendColor` function. The SVG rendering includes labeled axes and a title.

AI-generated description

Multi-line Chart visualization of the average amount of cigarettes smoked per day by smokers of only top 5 countries from the CORGIS dataset 'https://corgis-edu.github.io/corgis/csv/smoking/' in D3. Color legend from Susie Lu and colorbrewer.

MIT Licensed

Similar vizzes