adding menus to animation of reusable D3 scatterplot
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 descriptionA bare minimum HTML page demonstrating use of CSS and JavaScript.
See also React Starter.