A6_Q2
✓ Published0🌍 Public
This example shows the distribution of IMDb movie ratings across six genres, using a stacked horizontal bar chart where each bar represents a genre and each colored segment shows the proportion of movies in a rating range from below 5.0 to above 8.5. The chart uses d3.stack() to compute the stacked series and d3.scaleBand for the categorical y-axis and d3.scaleLinear for the percentage x-axis. Interactive tooltips appear on mouseover events, displaying the exact percentage for each rating category. The data is loaded from a CSV file and rendered as SVG elements.
AI-generated descriptionMIT Licensed