Skip to main content
100%

Reusable D3 Scatter Plot

✓ Published1🌍 Public
KKande2011
Last edited Mar 28, 2022
Created on Mar 28, 2022

This interactive scatter plot animates through different pairings of attributes from the Iris Dataset, cycling every two seconds to reveal various relationships between sepal and petal measurements. The visualization uses D3 v6 to construct a reusable chart component via the `scatterPlot` builder pattern, with axes drawn using `scaleLinear`, `axisLeft`, and `axisBottom`. Color encodes species through `scaleOrdinal`, while the animation is driven by `setInterval` updating the `xValue` mapping. Rendered as an SVG with transparent background, the chart includes a custom legend and displays three species groups with distinct colors.

AI-generated description

A reusable scatter plot inspired by Towards Reusable Charts.

Shows the Iris Dataset.

MIT Licensed

Similar vizzes