Fork of Fork of reusable scatter plot
✓ Published1🌍 Public
This reusable scatter plot visualizes the relationship between horsepower and miles per gallon for 20 cars, with a 2-second interval animation that swaps the axes. Built with D3 v6, the chart uses `d3.scaleLinear`, `d3.extent`, `d3.axisBottom`, and `d3.axisLeft` to render SVG circles with tooltips, while a reusable `scatterPlot()` factory function manages the configurable width, height, margin, and accessor functions. The animation is driven by `setInterval` reassigning the x and y value accessors and re-rendering via `.call(plot)`.
AI-generated descriptionMIT Licensed