Viewing a saved revision (read-only)
d22413e1bab249c29b7887c701056786
Activity6_Qu-2
This stacked bar chart visualizes the percentage distribution of movie ratings across different genres, with each bar segment representing a rating category. The chart uses a horizontal layout where genres appear on the y-axis and percentage values on the x-axis. Users can hover over individual segments to see precise percentage tooltips, and clicking a segment displays the value in an alert. The visualization is built with D3.js v6, using `d3.stack()` for data stacking, `d3.scaleBand()` for the categorical axis, and `d3.scaleLinear()` for the numerical axis. Data comes from a CSV file containing genre and rating percentage columns.
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.