Fork of reusable scatter plot
✓ Published2🌍 Public
A reusable scatter plot cycles every two seconds between horsepower and miles-per-gallon axes for a 20-row car dataset. Built with D3 v6, it uses a reusable chart function with getter-setters for width, margin, and accessor functions. The SVG renders axes, labels, and steelblue circles with hover tooltips via appended title elements, while a setInterval reassigns xValue and yValue to flip the variables. The chart removes and recreates the SVG on each update, producing an animated axis-switching visualization.
AI-generated descriptionReusable Scatter Plot
This project demonstrates a reusable scatter plot visualization using D3.js that automatically cycles between different variable combinations every 2 seconds.
Features
- Reusable chart component
- Dynamic axis switching
- Responsive design
- Tooltips on hover
MIT Licensed