Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

Activity 6 question 2

Public visualization

Viewing a saved revision (read-only)

629c630117b64f4fa4eb9dc2cd6e7330

Activity 6 question 2

0 stars0🌍 Public
AAamani Chamarthi
Last edited Oct 23, 2024
Created on Oct 23, 2024
Forked from Hello VizHub

This visualization displays the percentage breakdown of four iris flower measurements (sepal length, sepal width, petal length, petal width) for each of the three iris species. Built with D3 v7, it uses a horizontal stacked bar chart where each bar represents a species, and colored segments show the proportional contribution of each measurement. The code employs `d3.stack` to compute the stacked data, `d3.scaleLinear` for the percentage axis, and `d3.scaleBand` for the categorical species axis. Interactive tooltips reveal exact percentage values on hover, while the SVG rendering uses `d3.select` and `d3.append` to construct the chart and handles.

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.