Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

Fork of Reusable D3 Scatter Plot

Public visualization

Fork of Reusable D3 Scatter Plot

0 stars1🌍 Public
HHariniPotla@my.unt.edu
Last edited Mar 25, 2026
Created on Mar 25, 2026

This example presents a reusable scatter plot that maps daily visitors on the x-axis against sales on the y-axis, with each point sized by a fixed radius. The visualization loads CSV data from a GitHub gist, parsing numeric fields for day, sales, profit, orders, and visitors. Built with D3 v6, the code uses scaleLinear for axes, extent to compute domains, and axisLeft/axisBottom for rendering ticks. The scatterPlot function follows a reusable pattern, making it configurable via method chaining for width, height, margins, and data accessors, while SVG circles are joined to the DOM using selectAll and data.

AI-generated description

Comments

Sign in to join the discussion.

MIT Licensed