Skip to main content
Public

Share visualization

Loading preview…

Reusable D3 Scatter Plot

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

Reusable D3 Scatter Plot

1
KKaustav Sen
Last edited May 23, 2021
Created on May 23, 2021
Forked from D3 Scatter Plot

This example presents a reusable scatter plot built with D3 and React, visualizing the classic Iris dataset. It demonstrates how a modular chart component can be configured with data, axis titles, and margins. The code uses `d3.scaleLinear`, `d3.extent`, `d3.axisLeft`, and `d3.axisBottom` to map data to SVG coordinates, and renders circles with a fixed radius. The chart is driven by an asynchronous fetch of a CSV file, parsed into numeric columns, and displayed using the SVG rendering approach.

AI-generated description

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

See also React Starter.

Comments

Sign in to join the discussion.

MIT Licensed