Skip to main content
100%

Animated D3 Scatter Plot with menu

✓ Published1🌍 Public
AAdekola Aliu
Last edited Aug 24, 2024
Created on Aug 23, 2024

This interactive scatter plot visualizes the Iris dataset, displaying measurements such as petal width and sepal length as animated circles. Two dropdown menus let users independently select which measurement appears on the x-axis and y-axis, triggering smooth transitions of both the data points and axes. Built with D3 v6, the visualization uses the `selection.join` pattern to handle enter, update, and exit states, with circles animating their positions over a one-second duration. The axes are rendered using `axisLeft` and `axisBottom`, while the menus are constructed with a custom reusable `menu` component that dispatches change events.

AI-generated description

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

Shows the Iris Dataset.

MIT Licensed

Similar vizzes