Skip to main content
Public

Share visualization

Loading preview…

D3 Scatter Plot (Vanilla JavaScript and HTML)

vizhub.com

Shared links may look like this on X, LinkedIn, Slack, and Discord.

Before sharing, review the publishing checklist.

Choose how to deliver this visualization

LinkedIn caption

LinkedIn may not keep text supplied by the share sheet. Copy the caption and paste it into the post if needed. You can tag the VizHub company page when posting.

More options

Embed on a websiteCopy iframe embed code
Download & exportPNG, HTML, source ZIP

D3 Scatter Plot (Vanilla JavaScript and HTML)

1
Nnim@brejnholt.dk
Last edited Feb 1, 2024
Created on Jan 29, 2024
Forked from HTML Starter

This scatter plot visualizes the relationship between petal length and sepal length in the Iris dataset, with each flower represented as a circle. The SVG rendering uses d3.scaleLinear to map data values to screen coordinates and d3.axisLeft/axisBottom to draw the axes. Data loads asynchronously via d3.csv from a GitHub gist, and the code parses numeric fields before binding the marks. The example demonstrates the core pattern of joining data to SVG circles with the selection.join() method.

AI-generated description

Comments

Sign in to join the discussion.

MIT Licensed