🌍 Public
Viewing a saved revision (read-only)
123b690895154aedbf1d97ea99b8686b
Question 2.3
This example visualizes IMDb movie ratings across six music genres, showing the percentage distribution of ratings in five categories from "below 5.0" to "above 8.5" using a stacked horizontal bar chart. The chart is rendered as SVG with D3 v7, using `d3.stack()` to create stacked bars, `d3.scaleBand()` and `d3.scaleLinear()` for axes, and `d3.scaleOrdinal()` for color encoding. Interactive tooltips appear on mouseover via D3 event handlers, displaying the exact percentage for each segment. The data comes from a local CSV file loaded through `d3.csv`.
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.