Skip to main content
100%

Activity6_Task2

✓ Published1🌍 Public
JJayanth Reddy Sripathi
Last edited Oct 22, 2024
Created on Oct 22, 2024
Forked from Hello VizHub

This stacked horizontal bar chart illustrates how IMDb rating percentages are distributed across six film genres, with each genre’s bar segmented into five rating ranges from below 5.0 to above 8.5. Using D3’s data parsing, the visualization maps genre categories to the y-axis bands and scales the stacked segments along a linear percentage x-axis. The code employs D3’s `stack`, `scaleOrdinal` for color coding, `scaleBand` and `scaleLinear` for axes, and implements interactive tooltips with mouseover events that display exact percentages. The SVG output uses a custom color palette and axis labels styled with imported Google Fonts.

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