Skip to main content
Public

Share visualization

Loading preview…

Reuseable Scatter Plot on 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

Reuseable Scatter Plot on D3

0
UUzoemeka Okechukwu Innocent
Last edited Aug 23, 2023
Created on Aug 23, 2023

This example demonstrates a reusable scatter plot component built with D3 and React. It visualizes the Iris dataset, plotting petal length against sepal length, with each data point rendered as a circle with a radius of 5 pixels. The visualization uses D3’s `csv` function to fetch and parse data from a remote URL, and the `select` API to create an SVG canvas that fills the browser window. The scatter plot is implemented as a customizable function, accepting configurable properties for dimensions, margins, data, and axis value accessors.

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