Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

Activity 6 Task 2 Tutorial

Public visualization

Activity 6 Task 2 Tutorial

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

This stacked bar chart displays the distribution of movie ratings across six genres, with each bar segmented into five rating categories from “below 5.0” to “above 8.5.” The visualization uses D3 v7’s `d3.stack()` to compute the stacked segments, `d3.scaleBand()` for the y-axis genres, and `d3.scaleLinear()` for the percentage x-axis. Hovering over a segment triggers a tooltip showing the exact percentage for that rating category, achieved through mouse event listeners. The SVG chart loads data from an inline CSV and applies a custom color scale for the rating bands.

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.

Comments

Sign in to join the discussion.

MIT Licensed