🌍 Public
Viewing a saved revision (read-only)
2c7dc1d5065a4ec3b3a742dd2043eddf
Activity 6 task 2
This example displays a stacked bar chart showing the percentage distribution of IMDb rating categories across six movie genres. The chart reveals that documentaries and dramas have higher shares of strong ratings, while action and comedy films skew toward lower rating brackets. Built with D3.js (v7) and rendered as SVG, the visualization uses `d3.stack()`, `d3.scaleOrdinal()`, and `d3.axisBottom()` to compose the bars. Hovering over a segment triggers an HTML tooltip showing the precise percentage for that genre-rating pair, formatted with `d3.format()`. The data comes from a CSV file with pre-aggregated proportions per genre.
AI-generated description