task 2
✓ Published0🌍 Public
This example shows the distribution of IMDb ratings across thirteen movie genres, with each genre’s ratings divided into five percentage-based categories. A stacked horizontal bar chart displays the proportions, using color to distinguish rating bands. The visualization is built with D3 v7 and rendered as SVG. The code uses d3.stack to compute the stacked layout, d3.scaleBand for the categorical y-axis, and d3.scaleLinear for the x-axis, with mouseover events triggering a tooltip that shows the exact percentage for each segment.
AI-generated descriptionMIT Licensed