Activity7_Task9_Question2
✓ Published0🌍 Public
A D3 area chart displays the duration of study across ten academic subjects, with a light blue fill and monotone curve smoothing. The data is hardcoded as an array of objects containing Subject, Duration, Format, and Year attributes. Using `d3.scaleBand` and `d3.scaleLinear` for positioning, the chart renders an SVG with `d3.area`, `d3.curveMonotoneX`, and axes generated by `d3.axisBottom` and `d3.axisLeft`. Labels for "Subject" and "Duration (weeks)" are added, with margins applied via a translated SVG group.
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