Skip to main content
100%

Animated Reusable D3 Scatter Plot

✓ Published32🌍 Public
CCurran Kelleher
Last edited May 22, 2021
Created on May 22, 2021

This example demonstrates a reusable scatter plot that animates between different dimensions of the Iris dataset, cycling through petal width, sepal width, petal length, and sepal length every 3 seconds. The visualization uses D3 v6’s `scaleLinear`, `axisLeft`, and `axisBottom` to render axes, while `transition` and selection joins animate circle positions and axes smoothly. The code loads CSV data via `d3.csv` and implements a configurable chart function with setter methods for width, height, data, and margin.

AI-generated description

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

Shows the Iris Dataset.

MIT Licensed

Similar vizzes