Skip to main content
100%

Activity6_Task2

✓ Published0🌍 Public
KKhushi Desai
Last edited Oct 19, 2024
Created on Oct 19, 2024
Forked from Hello VizHub

This example shows a stacked horizontal bar chart of movie ratings across six genres, using the D3.js library (v7) to portray the percentage distribution of ratings from low to high for each genre. The data, sourced from a CSV file, is rendered as SVG. The code defines ordinal color scales for the rating categories, uses linear and band scales for positioning, and adds interactive tooltips on mouseover that display the exact percentage. D3 APIs like `d3.scaleOrdinal`, `d3.scaleLinear`, `d3.scaleBand`, `d3.axisBottom`, `d3.axisLeft`, and `d3.format` are used for layout and formatting.

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