Skip to main content
100%

Ep. 33 | Scatter Plot with Color

✓ Published0🌍 Public
YYee Han
Last edited Dec 30, 2020
Created on Dec 30, 2020

This example visualizes the classic Iris Dataset as an interactive scatter plot, letting users select which flower measurements to plot on the X and Y axes from dropdown menus. The chart renders each data point as a circle colored teal using SVG, with axes labeled and formatted via d3.scaleLinear, d3.extent, and d3.format. React manages the UI state, while D3’s csv loader fetches and parses the data. The code also includes a tooltip showing the X value on hover via SVG title elements.

AI-generated description

A scatter plot of The Iris Dataset.

MIT Licensed

Similar vizzes