Fork of Reusable D3 Scatter Plot
✓ Published0🌍 Public
This scatter plot visualizes the Iris dataset, mapping petal width and sepal length to x and y positions with a linear scale. The code uses D3 v6 APIs including d3.scaleLinear, d3.axisLeft, and d3.axisBottom to render axes and circles. An animation cycles through different data columns every two seconds, updating the x-axis domain and repositioning points via setInterval. The reusable chart pattern, inspired by Mike Bostock’s “Towards Reusable Charts,” encapsulates custom getter and setter methods for width, height, data, and margin, while loading data asynchronously with d3.csv.
AI-generated descriptionA reusable scatter plot inspired by Towards Reusable Charts.
Shows the Iris Dataset.
MIT Licensed