Skip to main content
100%

[Ep.10] Reusable d3 Scatter Plot (idempotent version)

✓ Published1🌍 Public
AAndrea Mignone
Last edited Jun 3, 2021
Created on May 25, 2021

This example shows a reusable D3.js scatter plot built with React, visualizing the classic Iris dataset. The plot animates through different feature pairs (petal width, sepal width, petal length, sepal length) on the x-axis, updating every two seconds. It uses d3's `scaleLinear`, `extent`, `axisLeft`, and `axisBottom` APIs to create the axes and render SVG circles. The chart is idempotent, meaning it can be re-invoked with new data or configurations without duplicating elements, thanks to D3's `join` method.

AI-generated description

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

See also React Starter.

MIT Licensed

Similar vizzes