Skip to main content
Public

Share visualization

Loading preview…

Simple Interactive Color Legend

vizhub.com

Shared links may look like this on X, LinkedIn, Slack, and Discord.

Before sharing, review the publishing checklist.

Choose how to deliver this visualization

LinkedIn caption

LinkedIn may not keep text supplied by the share sheet. Copy the caption and paste it into the post if needed. You can tag the VizHub company page when posting.

More options

Embed on a websiteCopy iframe embed code
Download & exportPNG, HTML, source ZIP

Simple Interactive Color Legend

0
LLisa Wagner
Last edited Aug 25, 2021
Created on Aug 25, 2021

This interactive scatter plot visualizes the Iris Dataset using React and SVG, with D3 scales for positioning and color encoding. The legend lists species names as colored circles, and hovering over a legend item triggers a fade effect that dims all non-matching data points while keeping the selected species fully opaque. The chart uses `scaleOrdinal` for categorical colors and `scaleLinear` for axes, with the hover state managed via React's `useState` hook.

AI-generated description

A scatter plot of The Iris Dataset.

Comments

Sign in to join the discussion.

MIT Licensed