Skip to main content
100%

Activity_6_task_2

✓ Published1🌍 Public
Lleelakrishnadivi7@gmail.com
Last edited Oct 22, 2024
Created on Oct 22, 2024
Forked from Hello VizHub

This example visualizes the distribution of IMDb movie ratings across six genres using a stacked horizontal bar chart. It shows the percentage of movies falling into five rating brackets, from below 5.0 to above 8.5, with each genre represented as a distinct bar. The chart is built with D3 v7, using d3.stack() to compute the stacked segments, d3.scaleOrdinal() for color encoding, and d3.scaleBand() for the categorical y-axis. Interactive tooltips reveal exact percentages on mouseover, using d3.select() and element event handlers. The data comes from a CSV file containing genre and rating proportion values.

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