projects
/
dygraphs.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
BUGFIX: Fixed jittering test results by ignoring the alpha value in the color checks.
[dygraphs.git]
/
gallery
/
highlighted-series.js
diff --git
a/gallery/highlighted-series.js
b/gallery/highlighted-series.js
index
27a6458
..
2fdd1cf
100644
(file)
--- a/
gallery/highlighted-series.js
+++ b/
gallery/highlighted-series.js
@@
-27,19
+27,6
@@
var getData = function(numSeries, numRows, isStacked) {
return data;
};
return data;
};
-var makeClickCallback = function(graph) {
- var isLocked = false;
- return function(ev) {
- if (isLocked) {
- graph.clearSelection();
- isLocked = false;
- } else {
- graph.setSelection(graph.getSelection(), graph.getHighlightSeries(), true);
- isLocked = true;
- }
- };
-};
-
var makeGraph = function(className, numSeries, numRows, isStacked) {
var demo = document.getElementById('demo');
var div = document.createElement('div');
var makeGraph = function(className, numSeries, numRows, isStacked) {
var demo = document.getElementById('demo');
var div = document.createElement('div');
@@
-73,7
+60,14
@@
var makeGraph = function(className, numSeries, numRows, isStacked) {
highlightCircleSize: 5,
},
});
highlightCircleSize: 5,
},
});
- g.updateOptions({clickCallback: makeClickCallback(g)}, true);
+ var onclick = function(ev) {
+ if (g.isSeriesLocked()) {
+ g.clearSelection();
+ } else {
+ g.setSelection(g.getSelection(), g.getHighlightSeries(), true);
+ }
+ };
+ g.updateOptions({clickCallback: onclick}, true);
g.setSelection(false, 's005');
//console.log(g);
};
g.setSelection(false, 's005');
//console.log(g);
};