Activity 6 Task 2 Tutorial
✓ Published0🌍 Public
This stacked bar chart displays the distribution of movie ratings across six genres, with each bar segmented into five rating categories from “below 5.0” to “above 8.5.” The visualization uses D3 v7’s `d3.stack()` to compute the stacked segments, `d3.scaleBand()` for the y-axis genres, and `d3.scaleLinear()` for the percentage x-axis. Hovering over a segment triggers a tooltip showing the exact percentage for that rating category, achieved through mouse event listeners. The SVG chart loads data from an inline CSV and applies a custom color scale for the rating bands.
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