Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

Activity6_Task2

Public visualization

Activity6_Task2

0 stars2🌍 Public
MMandadi Nishita
Last edited Oct 20, 2024
Created on Oct 20, 2024
Forked from Hello VizHub

This example presents a stacked horizontal bar chart showing the distribution of IMDb ratings across different genres, with each genre broken into five rating categories from "below 5.0" to "above 8.5." The visualization uses D3 v7’s `d3.stack()` function to compute stacked values and `d3.scaleOrdinal()` with a custom color palette to distinguish rating bands. Interactive mouseover events, handled via `.on()`, reveal tooltips displaying the exact percentage for each genre-rating combination. The chart is rendered as an SVG, with axes formatted using D3’s `d3.axisBottom` and `d3.axisLeft`, and data is loaded from a local CSV file.

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