Skip to main content
100%

Activity 6_Task 2

✓ Published0🌍 Public
MMannava Priyanka Chowdary
Last edited Oct 22, 2024
Created on Oct 22, 2024
Forked from Hello VizHub

This example shows the distribution of IMDb movie ratings across six genres, with horizontal stacked bars displaying the percentage of movies in five rating categories from below 5.0 to above 8.5. The visualization uses d3.stack() to compute the stacked series, d3.scaleBand() and d3.scaleLinear() for positioning, and d3.scaleOrdinal() for color mapping. Interactive tooltips appear on mouseover via d3.select and event listeners, displaying the exact percentage for each genre-rating combination. The data comes from a CSV file loaded with d3.csv, rendered as SVG elements.

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