Reusable Charts Notes
✓ Published1🌍 Public
This example demonstrates a reusable scatter plot generated from the Iris dataset, which is loaded as CSV from a GitHub Gist. The chart visualizes the relationship between petal length and sepal length, using D3 version 7’s `scaleLinear`, `extent`, `axisLeft`, and `axisBottom` APIs to map data values to SVG coordinates and render axes. The code constructs a custom `scatterPlot` function with getter-setter methods for configuration, enabling the chart to be applied to an SVG element via method chaining. The final visualization fills the browser window and is rendered as an interactive SVG.
AI-generated descriptionA demonstration of how to start using D3 version 6.
MIT Licensed