Skip to main content
100%

activity 6question 2

✓ Published0🌍 Public
Ttsumanth619@gmail.com
Last edited Apr 4, 2024
Created on Apr 4, 2024
Forked from Hello VizHub

This stacked bar chart displays the distribution of movie ratings across five genres, segmenting each genre's total percentages into five rating ranges from "Below 5.0" to "Above 8.5". The visualization uses `d3.stack()` to aggregate the data, with `d3.scaleOrdinal` assigning distinct colors to each rating category. Horizontal bars are rendered using `d3.scaleBand` for genres and `d3.scaleLinear` for the percentage axis. Interactive tooltips, implemented with mouseover events, display the exact percentage for each rating segment when hovering, enhancing the data's readability. The chart is built with D3 v7 and rendered as SVG, using data from a CSV file.

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