Skip to main content
Public

Share visualization

Loading preview…

Basic Scatter Plot with React & D3

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

Basic Scatter Plot with React & D3

0
BBismark Kofi Owusu Sarfo
Last edited Sep 10, 2025
Created on Sep 10, 2025

This example presents a basic scatter plot that visualizes the Iris dataset, which users load as a CSV file through a file input. The React application parses the data and, using D3's `select` and `join` API, renders circles within an SVG element. The `viz.js` module configures linear scales via `scaleLinear` and `extent` to map sepal length and width values to the plot's dimensions, styling each point with a fixed radius and fill color. The chart updates whenever a new file is selected.

AI-generated description

Comments

Sign in to join the discussion.

MIT Licensed