🌍 Public
Viewing a saved revision (read-only)
7e4993299c614ea59a39aaa6ecd3bb8d
Activity6_q2
This stacked bar chart visualizes the distribution of ratings across different movie genres, with each bar segment representing a rating category’s proportion of the total. The chart aims to show how ratings are composed within each genre, with hovering over a segment revealing the exact percentage via a tooltip. Built with D3 v7, the code uses `d3.stack()`, `d3.scaleLinear`, and `d3.scaleBand` to render the SVG, while `d3.axisBottom` and `d3.axisLeft` provide the axes. The data is loaded from a CSV file, and percent values are formatted with `d3.format`.
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.