Skip to main content
100%

Fork of Interactive Color Legend

✓ Published0🌍 Public
JJesus Angel
Last edited Jul 6, 2021
Created on Jul 6, 2021

This example displays the classic Iris dataset as a scatter plot of petal length against sepal width, with points colored by species. Hovering over a species in the interactive color legend highlights only the corresponding points while fading the rest. Built with React and D3 v5, the visualization uses `scaleLinear` for both axes, `scaleOrdinal` for colors, and reusable axis components. The legend itself is implemented as a custom `ColorLegend` component that manages hover states and applies a configurable fade opacity to non-matching data points.

AI-generated description

A scatter plot of The Iris Dataset.

MIT Licensed

Similar vizzes