Reusable Charts
This example demonstrates a reusable scatterplot component built with D3.js, visualizing the classic Iris flower dataset. It plots sepal length against petal length, with each flower represented by a circle of fixed radius. The visualization includes axes, axis labels, and a title, using D3’s scaleLinear, axisLeft, axisBottom, and csv data loading. The code implements a configurable chart function with a fluent API for setting width, height, data, value accessors, margins, and radius, highlighting the reusable pattern.