Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

reusable scatter plot

Public visualization

Viewing a saved revision (read-only)

e71498b59ea2402d940eac1315b0b0a9

reusable scatter plot

0 stars1🌍 Public
119h61a05c9@cvsr.ac.in
Last edited Oct 26, 2025
Created on Oct 26, 2025
Forked from D3 Starter

This reusable scatter plot displays the relationship between horsepower and miles per gallon for a small car dataset, with each point representing a vehicle. The D3.js v6 code defines a configurable `scatterPlot()` function with getter-setters for dimensions and data mappings. It loads the comma-separated values file using `d3.csv()`, converts numeric fields, and renders an SVG chart with `d3.scaleLinear` extents, `d3.axisBottom`, `d3.axisLeft`, and labeled axes. Circle elements include interactive tooltips via SVG `title` elements, with styling for opacity and color.

AI-generated description