Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

Tutorial2_b

Public visualization

Viewing a saved revision (read-only)

98bab4caf3524378804d40bce4921725

Tutorial2_b

0 stars0🌍 Public
Ppranayrajana.97@gmail.com
Last edited Apr 14, 2024
Created on Apr 14, 2024
Forked from Hello VizHub

This stacked bar chart visualizes the percentage distribution of IMDb ratings across different movie genres, showing the relative share of each rating band within each genre. Hovering over a segment displays its exact percentage via a tooltip. The chart uses D3.js v7 with `d3.stack()` to create the stacked segments, `d3.scaleBand()` and `d3.scaleLinear()` for axes, and `d3.scaleOrdinal()` for color coding. Data comes from a CSV file, rendered as SVG elements, with mouse events triggering opacity changes and tooltip updates.

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.