Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

Task8_Activity2

Public visualization

Viewing a saved revision (read-only)

fbc2240e8b034129be5c6d1c09ab5b43

Task8_Activity2

0 stars0🌍 Public
Iikshwakalluri
Last edited Apr 11, 2024
Created on Apr 11, 2024
Forked from Hello VizHub

This example visualizes the distribution of petal lengths across three Iris species using a stacked bar chart with tooltips. The code loads data from a local CSV file and renders the chart as SVG using D3 v7. It employs `d3.stack()` to create stacked segments, `d3.scaleBand()` for the categorical species axis, and `d3.scaleLinear()` for the continuous petal length axis. Interactive mouseover events display tooltips showing the exact petal length for each species and segment.

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.