Activity6_Task2
✓ Published0🌍 Public
This stacked bar chart visualizes the distribution of IMDb movie ratings across six genres, with each bar segment representing the percentage of movies falling into one of five rating brackets. The chart uses D3 v7’s `d3.stack()` and `d3.scaleOrdinal()` to generate the stacked layout and color encoding, with axes rendered via `d3.axisBottom` and `d3.axisLeft`. A custom tooltip, appended to the body, displays the exact percentage for each segment on hover. Data is loaded from a CSV file and rendered as SVG elements within a fixed 960×500 viewport.
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