task9_question2
✓ Published0🌍 Public
A D3.js area chart displays total sales for the first five product codes from a CSV sales dataset. The visualization uses an SVG rendering with axes labeled "Product Code" and "Sales". The code parses dates and sales values, groups data by product code, and sums sales using d3.rollup and d3.sum. The area path is drawn with d3.area, while d3.scaleBand and d3.scaleLinear define the x and y coordinates, with axes created by d3.axisBottom and d3.axisLeft. The chart also rotates x-axis labels for readability.
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