Stacked Bar Chart
✓ Published1🌍 Public
This stacked bar chart displays the distribution of product categories—Formal, Casual, and Shoes—across four clothing brands. Each brand’s total value is segmented into three colored bars, with a legend identifying each category. The chart uses D3 v7’s `scaleBand` for the x-axis, `scaleLinear` for the y-axis, and `selectAll` to render the grouped rectangles as SVG. The dataset is hardcoded, and colors are assigned via an array of hex codes.
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