Assignment-2-Question-2
✓ Published0🌍 Public
This example visualizes car sales from 2013 to 2023 using an area chart, highlighting the trend in total sales over time. The D3 v5 code loads CSV data from a GitHub gist, parses the year field into a date object, and uses `d3.scaleTime` and `d3.scaleLinear` for scaling, with `d3.axisBottom` and `d3.axisLeft` for tick marks. It draws a smooth line with `d3.line` and `d3.curveBasis`, fills the area beneath using `d3.area`, and applies a green fill with custom CSS styles.
AI-generated descriptionAn example showing the capabilities of VizHub:
- Loads D3 via UNPKG.
- Demonstrates use of
importfrom"d3". - Demonstrates use of
importfrom local ES6 modules.
MIT Licensed