Skip to main content
100%

Reusable D3 Scatter Plot

✓ Published4🌍 Public
MMahesh
Last edited Apr 2, 2025
Created on Apr 1, 2025

This reusable D3 scatter plot visualizes crop production in India, showing relationships between variables like cultivated area, production, yield, and year, with data points colored by season. Built with a custom `scatterPlot` component using `scaleLinear`, `axisLeft`, and `axisBottom`, the chart automatically rotates the x-axis variable every three seconds using `setInterval`, updating titles and re-rendering the SVG. The code loads CSV data via `d3.csv` and uses the `select` API for DOM manipulation, with animations driven by re-calling the plot function.

AI-generated description
MIT Licensed

Similar vizzes