Skip to main content
100%

Reusable D3 Scatter Plot

✓ Published1🌍 Public
Ttrissentety
Last edited Feb 27, 2023
Created on Feb 27, 2023
Forked from D3 Scatter Plot

This example presents a reusable scatter plot visualizing the Iris Dataset, mapping petal length to the x-axis and sepal length to the y-axis. It demonstrates a configurable D3 chart factory pattern, where the scatter plot function accepts chained setters for width, height, data, accessors, margins, and point radius. The code uses D3's `scaleLinear`, `extent`, `axisLeft`, and `axisBottom` APIs to render an SVG with circles and axes. The data loads from a GitHub Gist CSV file, and the visualization fills the entire browser window.

AI-generated description

A vanilla HTML implementation of a D3 scatter plot. Shows the Iris Dataset.

MIT Licensed

Similar vizzes