Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

Activity_6 Task-2

Public visualization

Viewing a saved revision (read-only)

7cb0476a57df4cf5a78f78236a0e1cd3

Activity_6 Task-2

0 stars0🌍 Public
Kkesava
Last edited Oct 25, 2024
Created on Oct 25, 2024
Forked from Hello VizHub

This example visualizes the distribution of IMDb movie ratings across six genres using a stacked horizontal bar chart. The chart shows the percentage of movies falling into five rating brackets, from "below 5.0" to "above 8.5", with each genre represented by a single bar divided into colored segments. The visualization loads data from a CSV file and uses D3 v7 APIs including `d3.stack`, `d3.scaleOrdinal`, `d3.scaleLinear`, and `d3.scaleBand` to compute stacking, assign colors, and position bars. Interactive tooltips display exact percentages on mouseover, implemented with D3 event handlers.

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.