projects
/
dygraphs.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Import babel polyfill (#813)
[dygraphs.git]
/
gallery
/
annotations.js
diff --git
a/gallery/annotations.js
b/gallery/annotations.js
index
af0c542
..
290f0db
100644
(file)
--- a/
gallery/annotations.js
+++ b/
gallery/annotations.js
@@
-1,3
+1,4
@@
+/*global Gallery,Dygraph,data */
Gallery.register(
'annotations',
{
Gallery.register(
'annotations',
{
@@
-19,7
+20,7
@@
Gallery.register(
return "(" + ann.series + ", " + ann.x + ")";
}
return "(" + ann.series + ", " + ann.x + ")";
}
- g = new Dygraph(
+
var
g = new Dygraph(
document.getElementById("g_div"),
function() {
var zp = function(x) { if (x < 10) return "0"+x; else return x; };
document.getElementById("g_div"),
function() {
var zp = function(x) { if (x < 10) return "0"+x; else return x; };
@@
-54,7
+55,7
@@
Gallery.register(
);
var last_ann = 0;
);
var last_ann = 0;
- annotations = [];
+
var
annotations = [];
for (var x = 10; x < 15; x += 2) {
annotations.push( {
series: 'sine wave',
for (var x = 10; x < 15; x += 2) {
annotations.push( {
series: 'sine wave',
@@
-81,7
+82,6
@@
Gallery.register(
document.getElementById('add').onclick = function() {
var x = last_ann + 2;
document.getElementById('add').onclick = function() {
var x = last_ann + 2;
- var annnotations = g.annotations();
annotations.push( {
series: 'line',
x: "200610" + x,
annotations.push( {
series: 'line',
x: "200610" + x,