Skip to main content
100%

Fork of Fork of reusable scatter plot

✓ Published1🌍 Public
119h61a05c9@cvsr.ac.in
Last edited Oct 26, 2025
Created on Oct 26, 2025

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 description
MIT Licensed

Similar vizzes