Assignment2-Question2
✓ Published0🌍 Public
This example shows a smoothed area chart of car sales from 2013 to 2023, with a line overlay and green fill beneath the curve. It uses d3.csv to load the dataset, then d3.scaleTime and d3.scaleLinear to map years and totalsales to SVG coordinates. The chart renders axis labels, grid lines via d3.axisLeft and d3.axisBottom, and generates the path with d3.line and d3.area, both using curveBasis for smoothing. Data parsing converts the years column to JavaScript Date objects and sales to numbers.
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