Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

Tutorial-2

Public visualization

Viewing a saved revision (read-only)

fcd5046ce6a348d39c3ca4933fd9a02a

Tutorial-2

0 stars0🌍 Public
Gganeshrajuparmalla@my.unt.edu
Last edited Apr 3, 2024
Created on Apr 3, 2024
Forked from Hello VizHub

A stacked horizontal bar chart displays the percentage distribution of IMDb ratings across six movie genres, using five rating bands from below 5.0 to above 8.5. The chart uses `d3.stack` to compute the layered segments and `d3.scaleOrdinal` with a custom color palette for each band. `d3.scaleBand` positions the genres along the y-axis, while `d3.scaleLinear` maps percentages on the x-axis. Interactive tooltips appear on mouseover, showing the exact percentage for each genre-rating combination. Data comes from a CSV file loaded with D3 v7, rendered as SVG rectangles.

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.