Interactive Color Legend
✓ Published10🌍 Public
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.
AI-generated descriptionA scatter plot of the Iris Dataset with a color legend.
Hover on the color legend to highlight the marks that match!
See also:
MIT Licensed