Skip to main content
100%

Fork of Animated Reusable D3 Scatter Plot

✓ Published0🌍 Public
EEmma Schaale
Last edited Nov 5, 2022
Created on Nov 5, 2022

This example animates a scatter plot of the Iris Dataset, cycling through columns as the x-axis variable (petal width, sepal width, petal length, sepal length) every three seconds. It renders as an SVG with D3’s `scaleLinear`, `axisLeft`, and `axisBottom` for axes, and uses the `selection.join` API for efficient circle and axis updates. Transitions via `transition()` with a one-second duration and staggered delays smoothly reposition the points and axes. The chart is reusable, configured through chained methods like `.width()`, `.data()`, and `.xValue()`.

AI-generated description

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

Shows the Iris Dataset.

MIT Licensed

Similar vizzes