Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

Fork of Reusable D3 Scatter Plot

Public visualization

Viewing a saved revision (read-only)

8f406bd58f3046288ad1adaa222e1e87

Fork of Reusable D3 Scatter Plot

0 stars0🌍 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.