🌍 Public
Viewing a saved revision (read-only)
d6fa0fbe593d4166bdd4340ecfdf1475
Interactive Color Legend
This interactive scatter plot visualizes the Iris dataset, encoding petal length and sepal width on the x- and y-axes with species as color. A legend built with SVG circles and text responds to mouse hover, fading unrelated data points and highlighting the selected species. The code uses React hooks (`useState`) to manage the hovered value, D3 scales (`scaleLinear`, `scaleOrdinal`) for positioning and coloring, with data loaded asynchronously via `d3.csv`.
AI-generated descriptionA scatter plot of The Iris Dataset.