Skip to main content
100%

Reusable Scatter Plot

✓ Published0🌍 Public
HHemanthh81
Last edited Jul 21, 2023
Created on Jul 21, 2023

This example demonstrates a reusable scatter plot component built with D3 v6, visualizing the classic Iris dataset. The plot cycles through different feature pairs (petal width, sepal width, petal length, sepal length) every three seconds, animating circle positions and axis transitions using `transition().duration(1000)` and `selection.join()`. The component employs scaleLinear, axisLeft, axisBottom, and extent to map data to screen coordinates, with all circles and axes updating smoothly via enter, update, and exit selections.

AI-generated description

A reusable scatter plot inspired by Towards Reusable Charts and Observable: selection.join.

Shows the Iris Dataset.

MIT Licensed

Similar vizzes