Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

Activity-6_Question-2

Public visualization

Viewing a saved revision (read-only)

de7a91a33d784f86978a185596b61c1f

Activity-6_Question-2

0 stars0🌍 Public
RRISHIK KURIKELLY
Last edited Apr 6, 2024
Created on Apr 6, 2024
Forked from Hello VizHub

This example visualizes the impact of movie genres on ratings using a stacked bar chart, where each genre (represented by vegetables in the data) is broken down into rating-level percentages that sum to 1. Hovering over any segment displays a tooltip with the precise percentage for that rating category. The chart is built with D3 v7, using `d3.stack()` to create stacked bars, `d3.scaleBand()` for the y-axis, and `d3.scaleLinear()` for the x-axis. User interactions are handled through `.on('mouseover')`, `.on('mousemove')`, and `.on('mouseout')` events, with data loaded from an embedded 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.