Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

Fork of Scatter Plot with Color Legend

Public visualization

Viewing a saved revision (read-only)

8a255fff8a504058908709b517df9924

Fork of Scatter Plot with Color Legend

0 stars0🌍 Public
AAnkit-Ian-53787
Last edited Oct 30, 2021
Created on Oct 30, 2021

This example visualizes the Iris dataset as a scatter plot of petal length against sepal width, with points colored by iris species. It uses a color legend to map species to categorical colors. Built with React and D3 v5, the SVG rendering uses D3’s `scaleLinear`, `scaleOrdinal`, and `extent` APIs to compute scales, while axes and legend ticks are generated via custom React components. The data is loaded asynchronously from a CSV URL using D3’s `csv` function, with tooltips showing the petal length formatted via `format`.

AI-generated description

A scatter plot of The Iris Dataset with color legend.