Skip to main content
100%

Reusable D3 Scatterplot

✓ Published1🌍 Public
HHtet Yan Oo
Last edited Apr 30, 2024
Created on Apr 30, 2024

This reusable D3 scatterplot visualizes the Iris dataset, cycling through four flower measurements every two seconds to show different variable relationships. Built with D3 v7, it uses a custom scatterPlot function with `scaleLinear`, `extent`, `axisLeft`, and `axisBottom` to render SVG circles and axes. The animation loop calls `plot.xValue()` to dynamically swap the x-axis variable, demonstrating the reusable pattern’s flexibility. Data loads from a CSV via `d3.csv`, with coordinates recalculated on each update.

AI-generated description
MIT Licensed

Similar vizzes