Skip to main content
100%

Activity6_Task2

✓ Published0🌍 Public
HHari Kiran
Last edited Apr 10, 2024
Created on Apr 10, 2024
Forked from Hello VizHub

This example visualizes the distribution of IMDb movie ratings across six genres using a horizontal stacked bar chart. Each bar segment represents the proportion of ratings within a specific range (below 5.0, 5.0-6.5, 6.5-7.5, 7.5-8.5, above 8.5), with a sequential color scale distinguishing the categories. The chart is rendered as SVG using D3 v7, employing `d3.map`, `d3.stack`, `d3.scaleOrdinal`, and `d3.scaleBand` to construct the layout. Interactive tooltips display the exact percentage for each segment on hover, implemented via mouse event listeners.

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