Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

Activity 6_Task 2

Public visualization

Viewing a saved revision (read-only)

691a61b0e5c4471ab2d2d6565ce9f79d

Activity 6_Task 2

0 stars0🌍 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.