Skip to main content
100%

Animated Reusable D3 Scatter Plot

✓ Published1🌍 Public
Ccharlieronchetti@gmail.com
Last edited Feb 28, 2024
Created on Feb 28, 2024

This animated scatter plot cycles through the four numeric columns of the Iris dataset, smoothly transitioning the x-axis and circle positions every three seconds. Using D3’s `scaleLinear`, `extent`, and `transition`, it updates the x-value mapping while keeping y-values fixed to sepal length. The reusable `scatterPlot` function joins data to SVG circles, animating radius growth on entry and staggered transitions during updates, with axes redrawn via `axisBottom` and `axisLeft`. Data loads as CSV, and the 1-second transitions create a clear visual comparison of feature distributions.

AI-generated description

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

See also React Starter.

MIT Licensed

Similar vizzes