ICE #7 - Line Chart
✓ Published0🌍 Public
This line chart displays plug-in hybrid electric vehicle (PHEV) sales in the United States from 2010 to 2021, highlighting a general upward trend with notable dips in 2015 and 2020. The visualization uses D3 v5 to render an SVG, with `d3.scaleTime` and `d3.scaleLinear` mapping years and sales counts, while `d3.line` generates the path and `d3.axisBottom` and `d3.axisLeft` create labeled axes. Data comes from a CSV file loaded via `d3.csv`, which is parsed to convert years to dates and sales to numbers before setting the scales’ domains.
AI-generated descriptionThis line chart shows one week of temperature (in degrees Celcius) in San Francisco. The data comes from Data Canvas - Sense Your City.
Made in this video:
MIT Licensed