Fork of Scatter Plot with Color Legend
✓ Published0🌍 Public
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 descriptionA scatter plot of The Iris Dataset with color legend.
MIT Licensed