Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

Reusable D3 Scatter Plot

Public visualization

Viewing a saved revision (read-only)

1fce120ba6f54a2aa9111e664334a977

Reusable D3 Scatter Plot

0 stars1🌍 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.