Q2
✓ Published0🌍 Public
A horizontal stacked bar chart displays age-group categories (0–10 through 41–50) in a CSV, with each bar divided into four colored segments representing Category1 through Category4. The chart uses D3 v7’s `scaleBand` for vertical positioning, `scaleLinear` for the value axis, and `stack()` to compute segment offsets, with `axisBottom` and `axisLeft` for axes. SVG rectangles render each segment, and mouseover events show tooltip values via `d3.select`. A legend identifies the four category colors.
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