Skip to main content
100%

Fork of Reusable D3 Scatter Plot

✓ Published0🌍 Public
BBALAJI MANDAVA
Last edited Mar 28, 2024
Created on Mar 28, 2024

This example demonstrates an animated scatter plot built with D3 v7, visualizing the Iris dataset by cycling through different measurement columns (petal width, sepal width, petal length, and sepal length) on the x-axis every two seconds. It uses `d3.scaleLinear` for axes, `d3.extent` for domain calculation, and `d3.axisLeft`/`d3.axisBottom` for rendering scales. The reusable chart pattern, inspired by Towards Reusable Charts, exposes setter methods (`.width`, `.data`, `.xValue`) to configure the plot. Circles represent individual flowers, with smooth updates via `selection.join`, and the data loads from a CSV file using `d3.csv`.

AI-generated description

A reusable scatter plot inspired by Towards Reusable Charts.

Shows the Iris Dataset.

MIT Licensed

Similar vizzes