🌍 Public
Viewing a saved revision (read-only)
f5a33fd475e94881b8c00768edd4cf3d
Activity6_Question2
This stacked bar chart visualizes the distribution of five personality traits—Sarcastic, Funny, Stylish, Moody, and Attractive—among six Friends characters. Each bar represents a character, with segments proportionally sized to sum to 100% per character. Hovering over a segment triggers a tooltip displaying the precise percentage. The visualization uses D3 v7 with `d3.stack()`, `d3.scaleBand()`, and `d3.scaleLinear()` to compute and render the stacked layout as SVG rectangles, with a custom color scale for each trait.
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.