@qogni/dygraphs
Version:
dygraphs is a fast, flexible open source JavaScript charting library.
93 lines (71 loc) • 3.25 kB
Markdown
[](https://travis-ci.org/danvk/dygraphs) [](https://coveralls.io/r/danvk/dygraphs)
The dygraphs JavaScript library produces interactive, zoomable charts of time series:
<img src="https://cloud.githubusercontent.com/assets/98301/5311286/eb760eea-7c10-11e4-9a59-1d144e51a15b.png" width="618" height="322">
Learn more about it at [dygraphs.com](http://www.dygraphs.com).
Get help with dygraphs by browsing the on [Stack Overflow][] (preferred) and [Google Groups][].
* Plots time series without using an external server or Flash
* Supports [error bands][] around data series
* Interactive [pan and zoom][]
* Displays values [on mouseover][]
* Adjustable [averaging period][]
* Extensive set of [options][] for customization.
* Compatible with the [Google Visualization API][gviz]
```html
<html>
<head>
<script type="text/javascript" src="dygraph.js"></script>
<link rel="stylesheet" href="dygraph.css" />
</head>
<body>
<div id="graphdiv"></div>
<script type="text/javascript">
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 [cdnjs][] or [from NPM][npm] (see below).
Get dygraphs from NPM:
npm install dygraphs
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:
```js
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.
To get going, clone the repo and run:
npm install
npm run build
Then open `tests/demo.html` in your browser.
Read more about the dygraphs development process in the [developer guide](/DEVELOP.md).
dygraphs is available under the MIT license, included in LICENSE.txt.
[]: https://cdnjs.com/libraries/dygraph
[]: http://www.dygraphs.com/tutorial.html
[]: http://www.dygraphs.com/gallery
[]: http://dygraphs.com/tests/legend-values.html
[]: http://dygraphs.com/tests/link-interaction.html
[]: http://dygraphs.com/tests/legend-values.html
[]: http://dygraphs.com/tests/temperature-sf-ny.html
[]: http://www.dygraphs.com/options.html
[]: http://stackoverflow.com/questions/tagged/dygraphs?sort=votes&pageSize=50
[]: http://groups.google.com/group/dygraphs-users
[]: http://dygraphs.com/data.html#datatable
[]: https://www.npmjs.com/package/dygraphs
[]: https://github.com/danvk/dygraphs-es6