Skip to main content
100%

Activity6_Task2

✓ Published3🌍 Public
Hhemalathayella@my.unt.edu
Last edited Apr 3, 2024
Created on Apr 3, 2024
Forked from Hello VizHub

This example visualizes IMDb movie rating distributions across six genres using a stacked horizontal bar chart. Each bar represents a genre, segmented into five rating categories from "below 5.0" to "above 8.5," with segment widths proportional to the percentage of movies in that category. The code loads data from a local CSV file and uses D3 v7 APIs including `d3.stack`, `d3.scaleOrdinal`, `d3.scaleBand`, and `d3.scaleLinear` to construct the chart. Interactive tooltips appear on mouseover, displaying the exact percentage for each rating segment, with opacity changes highlighting the hovered bar portion.

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