Skip to main content
100%

Interactive Color Legend

✓ Published0🌍 Public
Ttrissentety
Last edited Feb 10, 2023
Created on Feb 9, 2023

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 description

A scatter plot of The Iris Dataset.

MIT Licensed

Similar vizzes