Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

Interactive Color Legend

Public visualization

Viewing a saved revision (read-only)

44831da558a04e1482cf2f0064cdae25

Interactive Color Legend

0 stars1🌍 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.