Skip to main content
100%

Fork of Reusable D3 Scatter Plot

✓ Published1🌍 Public
SSravaniPosina
Last edited Mar 10, 2023
Created on Mar 10, 2023

A reusable scatter plot animates the Iris Dataset, cycling through four measured variables on the x-axis every two seconds while sepal length remains fixed on the y-axis. Built with D3 v6, the chart uses `scaleLinear`, `extent`, `axisLeft`, and `axisBottom` to render SVG circles and axes. The code demonstrates a configurable chart factory pattern, where setters like `.width`, `.data`, and `.xValue` update the visualization, with `setInterval` triggering re-renders to switch between petal width, sepal width, petal length, and sepal length.

AI-generated description

A reusable scatter plot inspired by Towards Reusable Charts.

Shows the Iris Dataset.

MIT Licensed

Similar vizzes