Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

Question2_Sivani

Public visualization

Viewing a saved revision (read-only)

d2855cd5fc254f84b2e500ee0d991149

Question2_Sivani

0 stars0🌍 Public
Kkommineniamarasadasivani2002@gmail.com
Last edited Mar 31, 2025
Created on Mar 31, 2025
Forked from Hello VizHub

This visualization uses a stacked horizontal bar chart to show the percentage distribution of the iris dataset attributes (sepal length, sepal width, petal length, and petal width) across three iris species. The D3.js v7 code loads data from a CSV file and uses `d3.stack()` to compute the stacked values, with `d3.scaleBand()` for the categorical y-axis and `d3.scaleLinear()` for the percentage x-axis. An interactive tooltip displays the exact percentage value when hovering over each segment, while the color scale assigns distinct colors to each attribute.

AI-generated description