Skip to main content
100%

D3 Scatter Plot (Vanilla JS)

✓ Published5🌍 Public
AAndrea Mignone
Last edited May 6, 2021
Created on May 5, 2021

This example renders a scatter plot of iris flower measurements, mapping petal length to the x-axis and sepal length to the y-axis. It loads CSV data from a Gist URL using `d3.csv`, parses numeric fields, and applies `d3.scaleLinear` for both axes. Circles are appended to an SVG via `d3.select` and `join`, with axes generated by `d3.axisLeft` and `d3.axisBottom`. The chart fills the browser window, using a margin convention and D3 v6 with vanilla JavaScript.

AI-generated description

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

See also React Starter.

MIT Licensed

Similar vizzes