Skip to main content
100%

Activity 6 Task 2 Tutorial

✓ Published0🌍 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.
MIT Licensed

Similar vizzes