🌍 Public
Viewing a saved revision (read-only)
db49f249ddee4d74a46c02b7ea01f48b
Interactive Color Legend
A scatter plot of the Iris dataset visualizes petal length against sepal width, with each point colored by species. An interactive color legend on the right highlights a selected species: hovering over a legend item fades non-matching points and re-renders the filtered subset on top. The example uses React with D3 scales (`scaleLinear`, `scaleOrdinal`) and renders SVG circles, while `onMouseEnter` and `onMouseOut` handlers drive the hover state and opacity transitions.
AI-generated descriptionA scatter plot of The Iris Dataset.