Skip to main content
100%

Reusable D3 Scatter Plot

✓ Published0🌍 Public
OOleg Zhernovoy
Last edited Dec 27, 2022
Created on Dec 27, 2022

A reusable scatter plot charts the Iris dataset, with petal width mapped to the x-axis and sepal length to the y-axis. Built with D3 v6, it demonstrates a modular chart factory pattern using `scaleLinear`, `extent`, `axisLeft`, and `axisBottom`. SVG circles render the data points, with axes and margins configured via a fluent API. Every two seconds, the x-axis mapping cycles through different iris measurements, animating the plot's layout while preserving the same visual encoding.

AI-generated description

A reusable scatter plot inspired by Towards Reusable Charts.

Shows the Iris Dataset.

MIT Licensed

Similar vizzes