Viewing a saved revision (read-only)
e1523e4f12f44593b050151f2e67700d
Q2 - Jaynica nunna
This visualization displays the percentage distribution of iris flower measurements across three species using a stacked horizontal bar chart. The chart encodes each species as a bar segment, with colors differentiating the four measurement attributes (sepal length, sepal width, petal length, petal width) as proportional parts of the whole. Built with D3.js v7, the code uses `d3.stack()` to compute stacked series, `d3.scaleLinear` and `d3.scaleBand` for axes, and `d3.scaleOrdinal` for color mapping. Interactive tooltips appear on mouseover, showing the exact percentage for each attribute segment. The data comes from the classic Iris dataset loaded from a CSV file.
AI-generated descriptionAn example showing the capabilities of VizHub:
- Loads D3 via UNPKG.
- Demonstrates use of
importfrom"d3". - Demonstrates use of
importfrom local ES6 modules.