Skip to main content
Public

Share visualization

Loading preview…

Reusable (ProD3.js) Animated Scatter Plot with Menus v2

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 (ProD3.js) Animated Scatter Plot with Menus v2

1
JJimMaltby
Last edited Apr 19, 2022
Created on Apr 18, 2022

An animated scatter plot of the Iris dataset lets users switch between measurement combinations via two dropdown menus. Built as a reusable D3 v6 chart, it displays points as SVG circles with coordinated transitions for position updates and axis rescaling. The code uses `d3.scaleLinear`, `d3.extent`, `d3.axisLeft`, `d3.axisBottom`, and `selection.join` to handle enter, update, and exit states, with `d3.transition` powering the 1-second animations.

AI-generated description

A reusable scatter plot inspired by Towards Reusable Charts and Observable: selection.join.

Shows the Iris Dataset.

Comments

Sign in to join the discussion.

MIT Licensed