Skip to main content
100%

Animated Reusable Scatter Plot with menu

✓ Published0🌍 Public
SShannon Teoh
Last edited May 26, 2024
Created on May 26, 2024

This example demonstrates an animated scatter plot of the Iris dataset, using D3 v6 with React. The plot cycles through different x-axis variables (petal length, petal width, sepal length, sepal width) every two seconds, with circles transitioning smoothly via `selection.join` and `transition`. Species are encoded by distinct symbols from `d3.symbols` and `scaleOrdinal`. The reusable chart function exposes setters like `.xValue()` and `.yValue()` to update the visualization, while axes are redrawn using `axisLeft` and `axisBottom`.

AI-generated description

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

See also React Starter.

MIT Licensed

Similar vizzes