Skip to main content
100%

Activity6_Task2

✓ Published0🌍 Public
RRishabh Sharma
Last edited Apr 5, 2024
Created on Apr 5, 2024
Forked from Hello VizHub

This stacked bar chart visualizes the distribution of IMDb movie ratings across six genres, with each bar segment representing the percentage of movies falling into one of five rating brackets. The chart uses D3 v7’s `d3.stack()` and `d3.scaleOrdinal()` to generate the stacked layout and color encoding, with axes rendered via `d3.axisBottom` and `d3.axisLeft`. A custom tooltip, appended to the body, displays the exact percentage for each segment on hover. Data is loaded from a CSV file and rendered as SVG elements within a fixed 960×500 viewport.

AI-generated description

An example showing the capabilities of VizHub:

  • Loads D3 via UNPKG.
  • Demonstrates use of import from "d3".
  • Demonstrates use of import from local ES6 modules.
MIT Licensed

Similar vizzes