The current version of dygraphs is 2.2.2 (docs ).
Most users will want to download minified files for this version:
For recent releases, GitHub
Releases hosts both source tarball
(dygraphs_2.2.2.orig.tar.gz , basically
the git repository packaged up) and binary release
(dygraphs-2.2.2.tgz , identical with
what was uploaded to NPM). The latter contains the precompiled
CSS and JS files in both readable and minified forms as well as
a copy of the documentation site, ideal for end users.
The former only contains the source code needed to build all of it;
distro packagers will want that file.
Content Delivery Networks
There's a hosted version of dygraphs on UNPKG :
<link rel="stylesheet" type="text/css" href="https://unpkg.com/dygraphs@2.2.2/dist/dygraph.min.css" />
<script type="text/javascript" src="https://unpkg.com/dygraphs@2.2.2/dist/dygraph.min.js"></script>
There's a hosted version of dygraphs on jsDelivr :
<link rel="stylesheet" type="text/css" href="https://cdn.jsdelivr.net/npm/dygraphs@2.2.2/dist/dygraph.min.css" />
<script type="text/javascript" src="https://cdn.jsdelivr.net/npm/dygraphs@2.2.2/dist/dygraph.min.js"></script>
Note: if you wish to use jsDelivr’s ESM feature, you need to replace
import * as dygraphs from 'https://esm.run/dygraphs'; , which is the string they give you, with
import Dygraph from 'https://esm.run/dygraphs'; , i.e. replace
the * as dygraphs part with Dygraph so to have that
symbol available. You’ll also still need to include the
CSS separately.
There's a hosted version of dygraphs on cdnjs.com
(note that it may take some time to update to new releases):
<link rel="stylesheet" type="text/css" href="//cdnjs.cloudflare.com/ajax/libs/dygraph/2.2.2/dygraph.min.css" />
<script type="text/javascript" src="//cdnjs.cloudflare.com/ajax/libs/dygraph/2.2.2/dygraph.min.js"></script>
But note that use of CDNs violates the EU-GDPR.
Install from binary packages
Besides the tarballs
(see above) you can also install dygraphs locally into your project
instead using NPM :
$ npm install dygraphs
# dygraphs is now in node_modules/dygraphs/dist/dygraph.{css,js} for
# the browser, and node_modules/dygraphs/index{,.es5}.js for nodejs
There’s also a Debian package available:
$ sudo apt-get install libjs-dygraphs
# dygraphs is now in /usr/share/javascript/dygraphs/dygraph.{css,js}
# To access the documentation locally, run in a terminal:
$ cd /usr/share/doc/libjs-dygraphs/site && python3 -m http.server
# Navigate to http://127.0.0.1:8000/ while this is running.
# When a webserver is running, do:
$ sudo apt-get install javascript-common
$ sudo a2enconf javascript-common.conf && sudo service apache2 reload
# dygraphs is now also available at /javascript/dygraphs/dygraph.{css,js}
# so it can be used from webpages served by the system in question
Most distributions include a source map to facilitate debugging.
Build from source
To generate your own minified JS, install the prerequisites…
… and run:
git clone https://github.com/danvk/dygraphs.git
cd dygraphs
npm install
npm run build-jsonly
This will create a dygraph.min.css and a dygraph.min.js
file in the dist directory.
Building and testing the full distribution
is slightly more intricate.
You may also download files for previously-released versions:
2.2.1: dygraph.min.css , dygraph.min.js , dygraph.css , dygraph.js (2.2.1 docs )
2.2.0: dygraph.min.js , dygraph.js , dygraph.css (2.2.0 docs )
2.1.0: dygraph.min.js , dygraph.js , dygraph.css (2.1.0 docs )
2.0.0: dygraph.min.js , dygraph.js , dygraph.css (2.0.0 docs )
1.1.1: dygraph-combined.js , dygraph-combined-dev.js (1.1.1 docs )
1.1.0: dygraph-combined.js , dygraph-combined-dev.js (1.1.0 docs )
1.0.1: dygraph-combined.js (1.0.1 docs )
1.0.0: dygraph-combined.js (1.0.0 docs )
See Version History
for more information on each release.