Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

Fork of Fork of Fork of Fork of reusable scatter plot

Public visualization

Viewing a saved revision (read-only)

bfab312968e74096a29d68ffc395ce98

Fork of Fork of Fork of Fork of reusable scatter plot

0 stars2🌍 Public
119h61a05c9@cvsr.ac.in
Last edited Oct 26, 2025
Created on Oct 26, 2025

This example shows a reusable D3.js scatter plot of a small car dataset, comparing horsepower and miles per gallon. A controller module updates the chart every two seconds, automatically swapping which attribute appears on the x- and y-axes. The visualization uses a modular `scatterPlot()` component with getter-setters, building an SVG with `d3.scaleLinear`, `d3.axisBottom`, and `d3.axisLeft`. Data loads from a local CSV via `d3.csv`, and each point is rendered as a circle with an opacity of 0.8.

AI-generated description