Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

Activity 6_Task 2

Public visualization

Viewing a saved revision (read-only)

1f7e421bf2924836845ea5a72202bf3e

Activity 6_Task 2

0 stars0🌍 Public
Ssasidhharreddy@gmail.com
Last edited Apr 15, 2024
Created on Apr 15, 2024
Forked from Hello VizHub

This example visualizes the distribution of IMDb movie ratings across six genres, showing the percentage of titles in each rating bracket from below 5.0 to above 8.5. It uses a stacked horizontal bar chart rendered with D3 v7 and SVG, where each genre is a bar and each segment represents a rating range. The code employs `d3.stack()` to compute the stacked series, `d3.scaleOrdinal` for color encoding, and `d3.scaleBand` for the categorical axis. Interactive tooltips display the exact percentage for each segment on hover.

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.