Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

Tutorial 2

Public visualization

Viewing a saved revision (read-only)

cb830e81c7f247f3aa569a51196dc345

Tutorial 2

0 stars0🌍 Public
Jjtulasi05@gmail.com
Last edited Oct 24, 2024
Created on Oct 24, 2024
Forked from Hello VizHub

This example shows the distribution of IMDb ratings across six movie genres, breaking down each genre into five rating categories as stacked proportions. The chart uses d3.stack() to compute cumulative values and d3.scaleBand for the genres, with d3.scaleOrdinal mapping categories to colors. Hovering over a segment triggers a tooltip that displays the exact percentage, and the code relies on d3.axisBottom and d3.axisLeft for axes, with data loaded from a local CSV file.

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.