Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

Activity Task 2

Public visualization

Viewing a saved revision (read-only)

3c9360cfc9c94f03bfaa97d4633fe483

Activity Task 2

0 stars0🌍 Public
Rrahulsiddhartha123@outlook.com
Last edited Apr 12, 2024
Created on Apr 12, 2024
Forked from Hello VizHub

This visualization displays the proportional ratings for different genres as horizontally stacked bars, using the classic Iris dataset. It maps the percentage composition of each genre across the data, with a legend indicating the rating categories. The code builds a stacked bar chart using `d3.stack()`, `d3.scaleBand()`, and `d3.scaleLinear()`, rendered as SVG. Interactive tooltips appear on mouseover, showing the exact percentage for each segment, and colors are assigned via `d3.scaleOrdinal()`.

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.