Skip to main content
100%

Animated Scatter Plot with Menus

✓ Published38🌍 Public
CCurran Kelleher
Last edited Apr 13, 2022
Created on May 29, 2021

This example presents an interactive scatter plot of the Iris dataset, where dropdown menus let users switch which attributes map to the X and Y axes. Built with D3 v6, the visualization animates point positions and axis scales over one second using `transition()`, while the HTML menus are created with a custom `menu()` component that dispatches change events. SVG circles grow from a zero radius on entry, and the plot is rendered using scaleLinear, axisLeft, and axisBottom.

AI-generated description

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

Shows the Iris Dataset.

MIT Licensed

Similar vizzes