X-Git-Url: https://adrianiainlam.tk/git/?a=blobdiff_plain;f=README.md;h=e539994d9e82d872dcca49882a18dbd570491595;hb=59ee387ba6d5113ceedba2b16b1c0c53ddfa072c;hp=b5801805653bac5a0fe64f4c5e6f3c8a7e13e3d6;hpb=067641c1a240c08fd3c11ccf8907494d2892d448;p=dygraphs.git diff --git a/README.md b/README.md index b580180..e539994 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,4 @@ +[![Build Status](https://travis-ci.org/danvk/dygraphs.svg?branch=markdown-readme)](https://travis-ci.org/danvk/dygraphs) [![Coverage Status](https://img.shields.io/coveralls/danvk/dygraphs.svg)](https://coveralls.io/r/danvk/dygraphs) # dygraphs JavaScript charting library The dygraphs JavaScript library produces interactive, zoomable charts of time series: @@ -6,24 +7,23 @@ The dygraphs JavaScript library produces interactive, zoomable charts of time se Learn more about it at [dygraphs.com](http://www.dygraphs.com). -Get help with dygraphs on -[Stack Overflow](http://stackoverflow.com/questions/tagged/dygraphs) (preferred) and -[Google Groups](http://groups.google.com/group/dygraphs-users) +Get help with dygraphs by browsing the on [Stack Overflow][] (preferred) and [Google Groups][]. ## Features * Plots time series without using an external server or Flash -* Supports [error bands](http://dygraphs.com/tests/legend-values.html) around data series -* Interactive [pan and zoom](http://dygraphs.com/tests/link-interaction.html) -* Displays values [on mouseover](http://dygraphs.com/tests/legend-values.html) -* Adjustable [averaging period](http://dygraphs.com/tests/temperature-sf-ny.html) -* Extensive set of [options](http://www.dygraphs.com/options.html) for customization. -* Compatible with the [Google Visualization API](http://dygraphs.com/data.html#datatable) +* 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] ## Minimal Example ```html - + +
@@ -41,24 +41,52 @@ Get help with dygraphs on ``` -Learn more by reading [the tutorial](http://www.dygraphs.com/tutorial.html) and -seeing demonstrations of what dygraphs can do in the -[gallery](http://www.dygraphs.com/gallery). +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). -## Making Changes -If you've made a change to dygraphs and would like to contribute it back to the -community, please follow the [Guide to making dygraphs -changes](http://dygraphs.com/changes.html). +## Usage with a module loader -## License(s) -dygraphs uses: - - UglifyJS (BSD License) - - JsDoc Toolkit (MIT license) - - console-polyfill (MIT license) +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. -automated tests use: - - auto_tests/lib/jquery-1.4.2.js (MIT & GPL2) - - auto_tests/lib/Asserts.js (Apache 2.0 License) - - auto-tests/lib/JsTestDriver-1.3.3cjar (Apache 2.0 License) +## Development +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). + +## License(s) dygraphs is available under the MIT license, included in LICENSE.txt. + +[cdnjs]: https://cdnjs.com/libraries/dygraph +[the tutorial]: http://www.dygraphs.com/tutorial.html +[gallery]: http://www.dygraphs.com/gallery +[error bands]: http://dygraphs.com/tests/legend-values.html +[pan and zoom]: http://dygraphs.com/tests/link-interaction.html +[on mouseover]: http://dygraphs.com/tests/legend-values.html +[averaging period]: http://dygraphs.com/tests/temperature-sf-ny.html +[options]: http://www.dygraphs.com/options.html +[Stack Overflow]: http://stackoverflow.com/questions/tagged/dygraphs?sort=votes&pageSize=50 +[Google Groups]: http://groups.google.com/group/dygraphs-users +[gviz]: http://dygraphs.com/data.html#datatable +[npm]: https://www.npmjs.com/package/dygraphs +[dygraphs-es6 repo]: https://github.com/danvk/dygraphs-es6