Tutorial2_b
This stacked bar chart visualizes the percentage distribution of IMDb ratings across different movie genres, showing the relative share of each rating band within each genre. Hovering over a segment displays its exact percentage via a tooltip. The chart uses D3.js v7 with `d3.stack()` to create the stacked segments, `d3.scaleBand()` and `d3.scaleLinear()` for axes, and `d3.scaleOrdinal()` for color coding. Data comes from a CSV file, rendered as SVG elements, with mouse events triggering opacity changes and tooltip updates.
AI-generated descriptionThe impact of genre on movie ratings
This stacked bar chart gives the percentage of each rating level within different movie genres. The aim is to show the impact of genre on movie ratings. When the mouse hovers over each bar, you can see pop-ups of accurate percentage of each rating level within each genre. Total percentage is 1, representing 100%.