Skip to main content
100%

Reusable D3 Scatter Plot

✓ Published0🌍 Public
SSonuSriN
Last edited Mar 27, 2022
Created on Mar 27, 2022

This interactive scatter plot displays the Iris dataset, with each point colored by species. The visualization cycles through different x-axis variable mappings every two seconds, animating transitions between petal width, sepal width, petal length, and sepal length. Built with D3 v6, it uses `scaleLinear`, `scaleOrdinal`, `axisLeft`, `axisBottom`, and `setInterval` to update the chart. The reusable `scatterPlot` function encapsulates the chart logic, while SVG circles and legend elements render the data, which is loaded via `d3.csv` from a GitHub Gist.

AI-generated description

A reusable scatter plot inspired by Towards Reusable Charts.

Shows the Iris Dataset.

MIT Licensed

Similar vizzes