Skip to main content
100%

Interactive Color Legend

✓ Published0🌍 Public
Yyptang5488
Last edited Oct 4, 2020
Created on Oct 4, 2020

This example visualizes the classic Iris dataset as an interactive scatter plot, with petal length and sepal width mapped to the x and y axes. A color legend on the right encodes the species of each flower, and hovering over a legend entry highlights the corresponding points while fading the rest. Built with React and D3.js, the code uses `d3.scaleLinear` and `d3.scaleOrdinal` for axes and color mapping, and renders the chart as SVG with event handlers on the legend circles to trigger the hover effect.

AI-generated description

A scatter plot of The Iris Dataset.

MIT Licensed

Similar vizzes