danvk/dygraphs

Interactive visualizations of time series using JavaScript and the HTML canvas tag

3,240

stars

2,433

commits

JavaScript

primary language

Jul 29, 2026

updated

dygraphs.com
canvas
charting-library
dygraphs
timeseries
visualization
Browse cluster: Data visualization libraries

README

dygraphs JavaScript charting library

The dygraphs JavaScript library produces interactive, zoomable charts of time series:

sample graph

Learn more about it at dygraphs.com.

Get help with dygraphs on Stack Overflow (preferred) and Google Groups.

Features

Minimal Example

<html>
<head>
<link rel="stylesheet" type="text/css" href="dygraph.css" />
<script type="text/javascript" src="dygraph.js"></script>
</head>
<body>
<div id="graphdiv"></div>
<script type="text/javascript"><!--//--><![CDATA[//><!--
  Dygraph.onDOMready(function onDOMready() {  // or jQuery $() etc.
    g = new Dygraph(
        document.getElementById("graphdiv"),  // containing div
        "Date,Temperature\n" +                // the data series
        "2008-05-07,75\n" +
        "2008-05-08,70\n" +
        "2008-05-09,80\n",
        { }                                   // the options
      );
  });
//--><!]]></script>
</body>
</html>

Learn more by reading the tutorial and seeing demonstrations of what dygraphs can do in the gallery. You can get dygraph.js and dygraph.css from UNPKG, jsDelivr, cdnjs or NPM (see below).

Usage with a module loader

Get dygraphs from NPM:

npm install dygraphs

Do not install from the git repository! Always use a tarball install, which contains the prebuilt files; npm fails to build the source code on install from github. (The tarball from the GitHub Registry is fine.)

You'll find pre-built JS & CSS files in node_modules/dygraphs/dist/. If you're using a module bundler like browserify or webpack, you can import dygraphs:

import Dygraph from 'dygraphs';
// or: const Dygraph = require('dygraphs');

const g = new Dygraph('graphdiv', data, { /* options */ });

Check out the dygraphs-es6 repo for a fully-worked example.

Development

To get going, install the following Debian packages…

  • jq
  • mksh
  • pax
  • python3

… clone the repo and run:

npm install
npm run build-jsonly

Then open tests/demo.html in your browser.

Read more about the dygraphs development process in the developer guide.

License(s)

AIn’t badge: made from 100% natural brains; CC0 by Bethan Tovey-Walsh via https://linguacelta.com/aint/

dygraphs is 100% human-written and available under the MIT licence, included in LICENSE.txt.

Use of so-called “AI” / LLMs to prepare a contribution or interact with anyone in the project or its users is not welcome.

Contributors

(top 30 of 101)

danvk

998 commits

mirabilos

522 commits

konigsbergoogle

415 commits

kberg

135 commits

danvk/dygraphs

Interactive visualizations of time series using JavaScript and the HTML canvas tag

3,240

stars

2,433

commits

JavaScript

primary language

Jul 29, 2026

updated

dygraphs.com
canvas
charting-library
dygraphs
timeseries
visualization
Browse cluster: Data visualization libraries

README

dygraphs JavaScript charting library

The dygraphs JavaScript library produces interactive, zoomable charts of time series:

sample graph

Learn more about it at dygraphs.com.

Get help with dygraphs on Stack Overflow (preferred) and Google Groups.

Features

Minimal Example

<html>
<head>
<link rel="stylesheet" type="text/css" href="dygraph.css" />
<script type="text/javascript" src="dygraph.js"></script>
</head>
<body>
<div id="graphdiv"></div>
<script type="text/javascript"><!--//--><![CDATA[//><!--
  Dygraph.onDOMready(function onDOMready() {  // or jQuery $() etc.
    g = new Dygraph(
        document.getElementById("graphdiv"),  // containing div
        "Date,Temperature\n" +                // the data series
        "2008-05-07,75\n" +
        "2008-05-08,70\n" +
        "2008-05-09,80\n",
        { }                                   // the options
      );
  });
//--><!]]></script>
</body>
</html>

Learn more by reading the tutorial and seeing demonstrations of what dygraphs can do in the gallery. You can get dygraph.js and dygraph.css from UNPKG, jsDelivr, cdnjs or NPM (see below).

Usage with a module loader

Get dygraphs from NPM:

npm install dygraphs

Do not install from the git repository! Always use a tarball install, which contains the prebuilt files; npm fails to build the source code on install from github. (The tarball from the GitHub Registry is fine.)

You'll find pre-built JS & CSS files in node_modules/dygraphs/dist/. If you're using a module bundler like browserify or webpack, you can import dygraphs:

import Dygraph from 'dygraphs';
// or: const Dygraph = require('dygraphs');

const g = new Dygraph('graphdiv', data, { /* options */ });

Check out the dygraphs-es6 repo for a fully-worked example.

Development

To get going, install the following Debian packages…

  • jq
  • mksh
  • pax
  • python3

… clone the repo and run:

npm install
npm run build-jsonly

Then open tests/demo.html in your browser.

Read more about the dygraphs development process in the developer guide.

License(s)

AIn’t badge: made from 100% natural brains; CC0 by Bethan Tovey-Walsh via https://linguacelta.com/aint/

dygraphs is 100% human-written and available under the MIT licence, included in LICENSE.txt.

Use of so-called “AI” / LLMs to prepare a contribution or interact with anyone in the project or its users is not welcome.

Contributors

(top 30 of 101)

danvk

998 commits

mirabilos

522 commits

konigsbergoogle

415 commits

kberg

135 commits

Languages

JavaScript

76.4%

HTML

19.7%

Shell

2.0%

Python

1.4%