Skip to main content
100%

Interactive Color Legend

✓ Published1🌍 Public
Ssophburke
Last edited Oct 9, 2019
Created on Oct 7, 2019

A scatter plot of the Iris dataset displays sepal width against petal length, with points colored by species. An interactive color legend on the right filters the visualization: hovering over a species name highlights matching points while dimming all others to 20% opacity. Built with React and D3 v5, the example uses `scaleLinear` and `scaleOrdinal`, SVG circles, and `onMouseEnter`/`onMouseOut` events to drive the hover state. The data loads via `d3.csv` from a gist.

AI-generated description

A scatter plot of The Iris Dataset. Adding a color legend to it.

MIT Licensed

Similar vizzes