Interactive Color Legend
✓ Published0🌍 Public
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 descriptionA scatter plot of The Iris Dataset.
MIT Licensed