Reusable D3 Scatter Plot - TN
This reusable scatter plot visualizes the Iris Dataset, mapping petal width against sepal length with animated transitions. It cycles through four attribute combinations every two seconds using `setInterval`. The chart is built with D3 v6, employing `scaleLinear`, `extent`, `axisLeft`, `axisBottom`, and data joins via `selection.join`. SVG circles update positions smoothly, while axes persist through idempotent re-rendering. The code follows a reusable chart pattern with setters for width, height, data, and margin, as demonstrated in Bostock’s "Towards Reusable Charts."