Tutorial-2
✓ Published0🌍 Public
A stacked horizontal bar chart displays the percentage distribution of IMDb ratings across six movie genres, using five rating bands from below 5.0 to above 8.5. The chart uses `d3.stack` to compute the layered segments and `d3.scaleOrdinal` with a custom color palette for each band. `d3.scaleBand` positions the genres along the y-axis, while `d3.scaleLinear` maps percentages on the x-axis. Interactive tooltips appear on mouseover, showing the exact percentage for each genre-rating combination. Data comes from a CSV file loaded with D3 v7, rendered as SVG rectangles.
AI-generated descriptionMIT Licensed