🌍 Public
Viewing a saved revision (read-only)
6938fa9fe3f244d0b16f8f698fe73ffc
Activity6_tutorial-2
This stacked bar chart shows the distribution of IMDb ratings across six movie genres, with each bar divided into five rating categories from "below 5.0" to "above 8.5". The visualization encodes percentages as horizontal bar lengths, using d3.stack() to compute stacked segments and d3.scaleOrdinal with a categorical color palette to distinguish rating bins. Interactive tooltips display exact percentage values on mouseover via D3 event handlers, while d3.axisBottom and d3.axisLeft position the percentage and genre scales. The SVG rendering uses data from an inline CSV file.
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.