🌍 Public
Viewing a saved revision (read-only)
3c9360cfc9c94f03bfaa97d4633fe483
Activity Task 2
This visualization displays the proportional ratings for different genres as horizontally stacked bars, using the classic Iris dataset. It maps the percentage composition of each genre across the data, with a legend indicating the rating categories. The code builds a stacked bar chart using `d3.stack()`, `d3.scaleBand()`, and `d3.scaleLinear()`, rendered as SVG. Interactive tooltips appear on mouseover, showing the exact percentage for each segment, and colors are assigned via `d3.scaleOrdinal()`.
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.