fork of activity_6_question_2
✓ Published0🌍 Public
This stacked bar chart displays product sales (productA, productB, productC) across four regions (North, South, East, West) using D3 v7. The visualization loads CSV data via `d3.csv` with `d3.autoType`, applies a band scale for regions and a linear scale for sales values, and renders SVG rectangles through the `d3.stack` layout. Color encoding uses `scaleOrdinal` with four categorical colors, with axes generated by `axisBottom` and `axisLeft`. A legend shows product categories, and the chart is scoped within defined margins on a 960×500 SVG canvas.
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