Skip to main content
100%

Simple scatterplot with d3.js

✓ Published0🌍 Public
Dd3noob
Last edited Nov 30, 2019
Created on Jun 22, 2014

This visualization combines a line graph and scatterplot to show Apple’s stock closing price over time, with data from a CSV file. The blue line connects daily price points, while small circles mark each individual observation along the series. Built with D3.js (version 3.5), it uses `d3.svg.line`, `d3.time.scale`, and `d3.svg.axis` to render the SVG path, axes, and date-based x-scale. The scatterplot circles are appended via `selectAll("dot")` with explicit radius and coordinate attributes. Data parsing relies on `d3.time.format` for date conversion and linear scaling for y-values.

AI-generated description

This is a follow on from the simple d3.js graph used as an example in the book D3 Tips and Tricks.

It adds points to a simple line graph to produce a hybrid line / scatterplot graph. It should be taken in context with the text of the book which can be downloaded for free from Leanpub.

mit Licensed

Similar vizzes