Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

Color Legend

Public visualization

Viewing a saved revision (read-only)

caa5b6e8a66d46d785e49c65b11a2f31

Color Legend

0 stars1🌍 Public
AAnimesh Nautiyal
Last edited Oct 17, 2020
Created on Oct 17, 2020

This interactive scatterplot lets users explore the Iris dataset by selecting which measurement to map to the x-axis (e.g., petal length, sepal width). Data points are rendered as circles using React and SVG, with their position derived from `d3.scaleLinear` for x and y values, and their color assigned via `d3.scaleOrdinal` based on species. A color legend, built from the same ordinal scale, displays each species’ color and name, while a dropdown menu updates the x-axis attribute using React state. The chart loads the data asynchronously using D3's `csv` function.

AI-generated description

color legend