Skip to main content
100%

Simple line graph in d3.js

✓ Published0🌍 Public
MMNoichl
Last edited Jan 29, 2018
Created on Jan 29, 2018

This simple line graph visualizes a small dataset of numeric date-value pairs loaded from a CSV file. It shows a single steel-blue polyline plotted against linear x and y axes, with five ticks per axis. The example uses d3.js v3 to parse the CSV, apply linear scales, and render the chart as SVG. It defines axes with d3.svg.axis and constructs the line path with d3.svg.line, demonstrating core D3 data-binding and scaling techniques for teaching purposes. The graph focuses on the essential structure of a D3 chart without additional interactivity or annotations.

AI-generated description

This is a simple line graph designed to allow investigation of aspects of using d3.js and is used as a teaching aid.

It is the baseline example graph used in the D3 Tips and Tricks book.

Edit: June 2014

I am going through a process of updating the code resources for the book and the latest (but not particularly different) example of this graph is here.

forked from <a href='http://bl.ocks.org/d3noob/'>d3noob</a>'s block: <a href='http://bl.ocks.org/d3noob/4414436'>Simple line graph in d3.js</a>

mit Licensed

Similar vizzes