Question2
✓ Published1🌍 Public
A stacked bar chart displays quarterly sales by product category, with categories on the y-axis and sales totals on the x-axis. The visualization uses D3 v7's `d3.stack`, `scaleBand`, `scaleLinear`, and `scaleOrdinal` APIs to construct the chart, with tooltips revealing the category and sales amount per segment. Data from the CSV file is loaded and rendered as SVG rectangles, with an interactive legend and axis labels. The code leverages D3's declarative `.join` pattern for efficient element updates.
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