Simple d3.js Graph
✓ Published0🌍 Public
Dd3noob
Last edited Nov 30, 2019
Created on Jun 20, 2014
This simple d3.js graph displays a time series of closing stock prices from a CSV file, with dates on the x-axis and values on the y-axis. Rendered as an SVG line chart, it uses d3.svg.line, d3.time.scale, and d3.scale.linear to map the data, while d3.svg.axis generates the axes. The data.csv file contains 26 daily entries from March to May 2012, positioned within a 600×270 pixel canvas with margins. The code also applies a steelblue stroke to the line and grey axis lines via CSS.
AI-generated descriptionThis is a simple d3.js graph used as an example in the book D3 Tips and Tricks.
It is aimed at providing some exposure to some d3.js functions and should be taken in context with the text of the book which can be downloaded for free from Leanpub.
mit Licensed