projects
/
dygraphs.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Delete multiple_axes-old properly. Keep it dead, dead, dead.
[dygraphs.git]
/
gallery
/
interaction.js
diff --git
a/gallery/interaction.js
b/gallery/interaction.js
index
fd50def
..
5936189
100644
(file)
--- a/
gallery/interaction.js
+++ b/
gallery/interaction.js
@@
-1,3
+1,6
@@
+/*global Gallery,Dygraph,data */
+/*global NoisyData,downV3,moveV3,upV3,clickV3,dblClickV3,scrollV3,restorePositioning,downV4,moveV4,upV4,dblClickV4,captureCanvas */
+
Gallery.register(
'interaction',
{
Gallery.register(
'interaction',
{
@@
-41,18
+44,18
@@
Gallery.register(
" to mark them.",
" </p>",
" <div id='div_g4' style='width:600px; height:300px;'></div>",
" to mark them.",
" </p>",
" <div id='div_g4' style='width:600px; height:300px;'></div>",
- "</div>"
,
+ "</div>"
].join('\n');
},
run: function() {
].join('\n');
},
run: function() {
+ var lastClickedGraph;
// TODO(konigsberg): Add cleanup to remove callbacks.
Dygraph.addEvent(document, "mousewheel", function() { lastClickedGraph = null; });
Dygraph.addEvent(document, "click", function() { lastClickedGraph = null; });
// TODO(konigsberg): Add cleanup to remove callbacks.
Dygraph.addEvent(document, "mousewheel", function() { lastClickedGraph = null; });
Dygraph.addEvent(document, "click", function() { lastClickedGraph = null; });
-
var g =
new Dygraph(document.getElementById("div_g"),
+ new Dygraph(document.getElementById("div_g"),
NoisyData, { errorBars : true });
NoisyData, { errorBars : true });
- var s = document.getElementById("g2_console");
- var g2 = new Dygraph(document.getElementById("div_g2"),
+ new Dygraph(document.getElementById("div_g2"),
NoisyData,
{
errorBars : true,
NoisyData,
{
errorBars : true,
@@
-69,15
+72,18
@@
Gallery.register(
}});
document.getElementById("restore3").onclick = function() {
restorePositioning(g3);
}});
document.getElementById("restore3").onclick = function() {
restorePositioning(g3);
- }
- var g4 = new Dygraph(document.getElementById("div_g4"),
- NoisyData, { errorBars : true, drawPoints : true, interactionModel : {
- 'mousedown' : downV4,
- 'mousemove' : moveV4,
- 'mouseup' : upV4,
- 'dblclick' : dblClickV4,
- },
- underlayCallback : captureCanvas
- });
+ };
+ new Dygraph(document.getElementById("div_g4"),
+ NoisyData, {
+ errorBars : true,
+ drawPoints : true,
+ interactionModel : {
+ 'mousedown' : downV4,
+ 'mousemove' : moveV4,
+ 'mouseup' : upV4,
+ 'dblclick' : dblClickV4
+ },
+ underlayCallback : captureCanvas
+ });
}
});
}
});