Skip to main content
100%

Reusable Fork of D3 Scatter plot

✓ Published1🌍 Public
GGbemiga Atolagbe
Last edited Jan 29, 2025
Created on Jan 15, 2025
Forked from D3 Scatter plot

This example presents a reusable D3 scatter plot implemented as a React-friendly function module, visualizing the classic Iris dataset. It maps petal length to the x-axis and sepal length to the y-axis using `scaleLinear` scales and `extent` to set domains. The code uses `csv` to load data and `axisLeft`/`axisBottom` for axes, while SVG circles are joined with the data via `selectAll` and `join`. The chart adapts to the browser window size and exposes setter methods for width, height, margins, and radius.

AI-generated description

A bare minimum HTML page demonstrating use of CSS and JavaScript.

See also React Starter.

MIT Licensed

Similar vizzes