🌍 Public
Viewing a saved revision (read-only)
61becdd49b4f448687a233b29fae1cad
assignment
This example shows a reusable scatter plot of engine horsepower versus fuel efficiency (MPG) using data embedded as a CSV string. The chart renders circles with semi-transparent crimson fill, labeled axes, and a custom margin and size configuration. Built with D3 v7, the code defines a configurable `scatterPlot` function exposing setters for dimensions, accessors, labels, color, and radius, then binds it to an SVG element via `datum` and `call`. SVG rendering handles the axes, grid-free plot, and point positioning through linear scales.
AI-generated description