🌍 Public
Viewing a saved revision (read-only)
ca0cf7da941548fe9e6996e59ccf3dfb
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.