Reusable D3 scattter plot Jerline
This example demonstrates a reusable scatter plot component built with D3 v6, visualizing the classic Iris Dataset. Data points represent flower measurements, with petal width and sepal length mapped to the x and y axes, while color encodes species (setosa, versicolor, virginica). The scatterPlot function encapsulates core chart logic, including axes, scaling, and circle rendering, and is configurable via fluent setters. An animation cycles through different column combinations every two seconds, updating the plot’s axes. The visualization is rendered as SVG, with a legend and custom styling applied via CSS.