Viewing a saved revision (read-only)
d935bceec44d4ab9bd0f3853f393d0a9
Act6_q2
This stacked bar chart shows the percentage distribution of five rating levels across different movie genres, revealing how genre influences audience ratings. Each horizontal bar represents a genre, subdivided into colored segments corresponding to rating categories, with hover interactions displaying precise percentages via tooltips. The visualization uses D3 v7’s `d3.stack()` to compute stacked data, `d3.scaleBand()` for the categorical y-axis, and `d3.scaleLinear()` for the percentage x-axis. Data is loaded from a CSV file where ratings are pre-calculated as percentages summing to 1, rendered as SVG rect elements with ordinal color scaling.
AI-generated descriptionThe impact of genre on movie ratings
This stacked bar chart gives the temperature in celsius.