Skip to main content
100%

adding menus to animation of reusable D3 scatterplot

✓ Published0🌍 Public
SSamuele Greco
Last edited Feb 11, 2022
Created on Feb 11, 2022

This example demonstrates an animated, reusable D3 scatterplot of the Iris dataset, with dropdown menus that let users select which quantitative columns appear on the x- and y-axes. The visualization renders data points as SVG symbols colored by species, with smooth transitions updating point positions and axis scales when selections change. The code builds on D3 v7 APIs including `scaleLinear`, `scaleOrdinal`, `symbol`, `transition`, and `dispatch`, while the menus are implemented as a reusable function that emits custom `change` events. The scatterplot itself is structured as a configurable function with setter methods for dimensions, data accessors, and styling options.

AI-generated description

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

See also React Starter.

MIT Licensed

Similar vizzes