Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

Fork of Reusable D3 Scatter Plot

Public visualization

Viewing a saved revision (read-only)

54a9c13824fb440c9bf1963b41b45c37

Fork of Reusable D3 Scatter Plot

0 stars0🌍 Public
Kkruthanreddy812@gmail.com
Last edited Mar 28, 2026
Created on Mar 28, 2026

This fork of a reusable D3 scatter plot visualizes laptop sales data, plotting cost on the x-axis against quantity sold on the y-axis. Each circle represents a data point colored by area using `d3.scaleOrdinal` with `schemeCategory10`. Built with React hooks, the code uses `useRef` and `useEffect` to manage the SVG lifecycle, clearing previous renders before appending new ones via `d3.select`. Axes are generated with `d3.axisBottom` and `d3.axisLeft`, while scales use `d3.scaleLinear` and `d3.extent`. The data is loaded asynchronously from a CSV file hosted on GitHub.

AI-generated description