Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

Activity6_Question2

Public visualization

Viewing a saved revision (read-only)

79b1e55b3f82406ba5c35fecffb85f62

Activity6_Question2

0 stars0🌍 Public
Aayeshamanzoor111798@gmail.com
Last edited Oct 25, 2024
Created on Oct 25, 2024

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 description

An example showing the capabilities of VizHub:

  • Loads D3 via UNPKG.
  • Demonstrates use of import from "d3".
  • Demonstrates use of import from local ES6 modules.