Skip to main content
100%

Activity6_Task2

✓ Published0🌍 Public
Ssathvik0311@gmail.com
Last edited Oct 24, 2024
Created on Oct 24, 2024
Forked from Hello VizHub

A stacked horizontal bar chart visualizes the distribution of IMDb ratings across six genres, using percentage categories ranging from "below 5.0" to "above 8.5." The chart renders as SVG elements via D3 v7, with each genre represented as a horizontal bar segmented into five colored rating bands. The visualization employs `d3.stack()` to compute stacked series, `d3.scaleBand` for the y-axis categories, and `d3.scaleLinear` for the x-axis percentages. Interactive tooltips appear on mouseover, displaying the exact percentage for any rating segment using `d3.format('.2f')`. The data comes from a local CSV file loaded with `d3.csv`.

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