Activity-6_Question-2.3
✓ Published0🌍 Public
This stacked bar chart displays regional sales data for three products across four regions, using a categorical color scale to distinguish each product category. Built with D3 v7, the visualization imports data from a local CSV file and applies d3.stack() to layer the series, with d3.scaleBand() for the x-axis and d3.scaleLinear() for the y-axis. Axes are rendered using d3.axisBottom() and d3.axisLeft(), while a custom legend reflects the stacked order. The SVG output includes hover styling defined in the accompanying CSS.
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