Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

Fork of Interactive Color Legend

Public visualization

Viewing a saved revision (read-only)

1b89d2867c014db480e773903b9ae09b

Fork of Interactive Color Legend

0 stars0🌍 Public
GGuo Ci
Last edited Jul 11, 2024
Created on Jul 11, 2024

This interactive scatter plot visualizes the Iris Dataset, showing sepal length against petal length with points colored by species. Hovering over a color legend highlights marks of that species while dimming others. Built with D3.js, it uses `d3.scaleLinear` and `d3.scaleOrdinal` with `schemeCategory10`, while the legend interacts via `setHoveredValue` and `hoveredValue` state. The code leverages `selection.join` for smooth updates and `d3.axisBottom` and `d3.axisLeft` for axes.

AI-generated description

A scatter plot of the Iris Dataset with a color legend.

Hover on the color legend to highlight the marks that match!

See also: