Skip to main content
100%

Activity6_Task2

✓ Published0🌍 Public
CChandra Prakash Reddy Kalwakolu
Last edited Apr 11, 2024
Created on Apr 11, 2024
Forked from Hello VizHub

This example visualizes IMDb movie ratings by genre as a stacked horizontal bar chart, showing the percentage distribution of ratings across five categories (below 5.0 to above 8.5) for six genres, from Documentary to Action. The chart uses D3 v7 APIs including `d3.stack()` to create the stacked segments, `d3.scaleOrdinal()` for color encoding, and `d3.scaleBand()` for the categorical y-axis. Interactive tooltips appear on hover, revealing precise percentages via a custom HTML div. The dataset is loaded from a local CSV file and rendered as SVG, with the title "Rating according to genres" displayed above the plot.

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