Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

Activity 7 - Stacked Bar

Public visualization

Viewing a saved revision (read-only)

6ec298a9466e4e8ea1d60a8b11a1b393

Activity 7 - Stacked Bar

0 stars0🌍 Public
Ppasyasahas
Last edited Jun 28, 2023
Created on Jun 28, 2023
Forked from Hello VizHub

This stacked bar chart visualizes the distribution of movie ratings across six genres, with each genre’s bar segmented by five rating intervals from “below 5.0” to “above 8.5.” The chart uses D3 v7’s `d3.stack()` and `d3.scaleOrdinal` to generate and color the segments, while `d3.scaleBand` positions genres on the y-axis. Interactive tooltips display exact percentages on mouseover. Data is loaded from a local CSV file using `d3.csv`.

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.