Line Plot with JavaScript - Plotly.js

Graph line plots with plotly.js. Plotly is Free software under the MIT license.

Plotly works even if you miss a couple of data points. For example, if you have temperature for all days but Tuesday.

Live Demo

This demo is created by running JavaScript in your browser. If you can't see it, check out the screenshot, or jump right into code.

Complete Web Page

<!doctype html>
		<title>Hello Plotly.js -</title>
		<h1>Hello Plotly.js -</h1>
		<div id="terosPlot"></div>
		<script src=""></script>
				[{x: [0, 1, 2, 5, 7], y: [1, 2, 4, 8, 16]}],


If you're learning JavaScript with JavaScript disabled, you can still enjoy this screenshot of the end result.

See also

This revisited and updated article is based on an earlier one: Simple Line Graph with Plotly.js