Activity 7 Task 2
✓ Published1🌍 Public
This example visualizes the distribution of movie ratings across six genres using a stacked horizontal bar chart. Each bar represents a genre, divided into five rating categories from "below 5.0" to "above 8.5," with segment lengths proportional to the percentage of movies in each category. The chart includes a color-coded legend, axis labels, and hover tooltips that display the exact percentage for each rating segment. The visualization is built with D3 v7, using `d3.csv` to load the data, `d3.stack` to process the rating categories, and `d3.scaleBand` and `d3.scaleLinear` for the axes. SVG rendering is used, with interactive mouse events for tooltips.
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