Activity6_Task2
✓ Published3🌍 Public
This example visualizes IMDb movie rating distributions across six genres using a stacked horizontal bar chart. Each bar represents a genre, segmented into five rating categories from "below 5.0" to "above 8.5," with segment widths proportional to the percentage of movies in that category. The code loads data from a local CSV file and uses D3 v7 APIs including `d3.stack`, `d3.scaleOrdinal`, `d3.scaleBand`, and `d3.scaleLinear` to construct the chart. Interactive tooltips appear on mouseover, displaying the exact percentage for each rating segment, with opacity changes highlighting the hovered bar portion.
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.
MIT Licensed