projects
/
dygraphs.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Clean-up.
[dygraphs.git]
/
dygraph-gviz.js
diff --git
a/dygraph-gviz.js
b/dygraph-gviz.js
index
7e514a6
..
b87fe80
100644
(file)
--- a/
dygraph-gviz.js
+++ b/
dygraph-gviz.js
@@
-17,6
+17,8
@@
* - http://dygraphs.com/tests/annotation-gviz.html
*/
* - http://dygraphs.com/tests/annotation-gviz.html
*/
+/*jshint globalstrict: true */
+/*global Dygraph:false */
"use strict";
/**
"use strict";
/**
@@
-25,7
+27,7
@@
*/
Dygraph.GVizChart = function(container) {
this.container = container;
*/
Dygraph.GVizChart = function(container) {
this.container = container;
-}
+}
;
Dygraph.GVizChart.prototype.draw = function(data, options) {
// Clear out any existing dygraph.
Dygraph.GVizChart.prototype.draw = function(data, options) {
// Clear out any existing dygraph.
@@
-37,7
+39,7
@@
Dygraph.GVizChart.prototype.draw = function(data, options) {
}
this.date_graph = new Dygraph(this.container, data, options);
}
this.date_graph = new Dygraph(this.container, data, options);
-}
+}
;
/**
* Google charts compatible setSelection
/**
* Google charts compatible setSelection
@@
-51,7
+53,7
@@
Dygraph.GVizChart.prototype.setSelection = function(selection_array) {
row = selection_array[0].row;
}
this.date_graph.setSelection(row);
row = selection_array[0].row;
}
this.date_graph.setSelection(row);
-}
+}
;
/**
* Google charts compatible getSelection implementation
/**
* Google charts compatible getSelection implementation
@@
-65,12
+67,14
@@
Dygraph.GVizChart.prototype.getSelection = function() {
if (row < 0) return selection;
if (row < 0) return selection;
- col = 1;
- for (var i in this.date_graph.layout_.datasets) {
+ var col = 1;
+ var datasets = this.date_graph.layout_.datasets;
+ for (var k in datasets) {
+ if (!datasets.hasOwnProperty(k)) continue;
selection.push({row: row, column: col});
col++;
}
return selection;
selection.push({row: row, column: col});
col++;
}
return selection;
-}
+}
;