Skip to main content
100%

activity7_question2

✓ Published0🌍 Public
Nnishwitha.1032@gmail.com
Last edited Nov 2, 2024
Created on Nov 2, 2024

This stacked bar chart shows the percentage of each rating level across different movie genres, with hover interactions revealing exact percentages in tooltips. The visualization uses D3.js v7, rendering SVG elements with the `d3.stack()` function to create stacked bars, `d3.scaleBand()` for the x-axis, and `d3.scaleLinear()` for percentages. A color ordinal scale distinguishes rating levels, while axes and a legend are drawn using `d3.axisBottom()`. Data is loaded from a CSV file using `d3.csv()`, though the source contains iris measurements rather than movie ratings.

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