Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

Activity 7 Task 2

Public visualization

Activity 7 Task 2

0 stars1🌍 Public
MMichael Biancardi
Last edited Jun 28, 2023
Created on Jun 28, 2023
Forked from Hello VizHub

This example visualizes the distribution of movie ratings across six genres using a stacked horizontal bar chart. Each bar represents a genre, divided into five rating categories from "below 5.0" to "above 8.5," with segment lengths proportional to the percentage of movies in each category. The chart includes a color-coded legend, axis labels, and hover tooltips that display the exact percentage for each rating segment. The visualization is built with D3 v7, using `d3.csv` to load the data, `d3.stack` to process the rating categories, and `d3.scaleBand` and `d3.scaleLinear` for the axes. SVG rendering is used, with interactive mouse events for tooltips.

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