Skip to main content
100%

Activity-6 Task2

✓ Published3🌍 Public
Hharshaps15@gmail.com
Last edited Apr 10, 2024
Created on Apr 10, 2024
Forked from Hello VizHub

This stacked bar chart visualizes the distribution of IMDb movie ratings across six genres, showing the proportion of films falling into five rating bands from below 5.0 to above 8.5. Each genre’s stacked bar sums to 100%, with color-coded segments revealing how documentary and animation films skew toward higher ratings while action movies concentrate in lower ranges. The visualization uses d3.stack() to compute layered data, d3.scaleOrdinal() with a custom color palette, and d3.scaleBand() for the genre axis. Hovering over any segment triggers a tooltip displaying the precise percentage, implemented through mouse events on SVG rectangles created via d3.selectAll().enter().append(). The data comes from a CSV file containing pre-aggregated percentages for each genre and rating category.

AI-generated description

The 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%.

MIT Licensed

Similar vizzes