Skip to main content
Public

Share visualization

Loading preview…

Animated 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

Animated Reusable D3 Scatter Plot

2
Nnim@brejnholt.dk
Last edited Feb 5, 2024
Created on Feb 2, 2024

This example animates a reusable D3 scatter plot that cycles through different iris flower measurements every 3 seconds. It uses D3’s `scaleLinear`, `axisLeft`, `axisBottom`, and the `transition` API to smoothly move circles and axes between states. The code fetches CSV data from a GitHub gist and renders SVG circles with staggered enter/update transitions, changing the x-axis mapping among petal width, sepal width, petal length, and sepal length.

AI-generated description

Comments

Sign in to join the discussion.

MIT Licensed