Skip to main content
Explore
Solutions
Bespoke Studio
Pricing
Quick Start
Demo
Log in
Send feedback
✕
Tell us what works and what could be better. We read every submission.
Send feedback
✕
Tell us what works and what could be better. We read every submission.
Home
•
Fork Viz
Fork Viz
Create your own copy of this visualization.
Forking from
Interactive Color Legend
Title
*
Description
This example visualizes the Iris Dataset as a scatter plot, mapping sepal length against petal length and coloring points by species using a categorical color scale. An interactive color legend allows hovering over species names to highlight corresponding marks while dimming others. The implementation leverages d3.scaleOrdinal, d3.scaleLinear, d3.extent, and d3.selection’s .join() method for efficient DOM updates. Axes and legends are composed as reusable functions, with hover interactions managed through explicit event handlers on legend ticks.
Visibility
Public
Private (only you), Pro
Unlisted (anyone with link)
Private work requires Pro.
Upgrade
Cancel
Fork Viz