Commit 4f31c72f authored by Romain Courteaud's avatar Romain Courteaud

Add dygraph viewer.

parent a5051118
......@@ -183,6 +183,16 @@ module.exports = function (grunt) {
},
curl: {
dygraph: {
src: "http://dygraphs.com/dygraph-combined.js",
relative_dest: 'lib/dygraph.js',
dest: '<%= global_config.dest %>/<%= curl.dygraph.relative_dest %>'
},
dygraphdata: {
src: "http://dygraphs.com/gallery/data.js",
relative_dest: 'lib/dygraphdata.js',
dest: '<%= global_config.dest %>/<%= curl.dygraphdata.relative_dest %>'
},
ace: {
src: 'https://github.com/ajaxorg/ace-builds/archive/3bfda31096cf3f42b77aac64eb788584ea796822.zip',
relative_url: "lib/ace-builds-3bfda31096cf3f42b77aac64eb788584ea796822/src-min/ace.js",
......
/*global console, Dygraph, NoisyData, rJS */
/*jslint nomen: true */
(function (window, rJS, Dygraph, NoisyData) {
"use strict";
rJS(window)
.ready(function (g) {
g.render();
})
.declareMethod('render', function (data) {
var gadget = this,
graph = new Dygraph(
data || NoisyData,
{
roolPeriod: 7,
errorBars: true
}
);
return graph;
});
}(window, rJS, Dygraph, NoisyData));
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Dygraph</title>
<script src="../<%= copy.rsvp.relative_dest %>" type="text/javascript"></script>
<script src="../<%= copy.renderjs.relative_dest %>" type="text/javascript"></script>
<script src="../<%= curl.dygraphdata.relative_dest %>" type="text/javascript" charset="utf-8"></script>
<script src="../<%= curl.dygraph.relative_dest %>" type="text/javascript" charset="utf-8"></script>
<script src="dygraph_gadget.js" type="text/javascript"></script>
</head>
<body>
</body>
</html>
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment