</head>
<body>
<p>Hover, click and zoom to test the callbacks:</p>
- <div id="g" style="width:600px; height:300px; position:relative;">
+ <div id="div_g" style="width:600px; height:300px; position:relative;">
</div>
<script type="text/javascript">
var lines = [];
var xline;
g = new Dygraph(
- document.getElementById("g"),
+ document.getElementById("div_g"),
NoisyData, {
rollPeriod: 7,
showRoller: true,
if (i == 0) xline.style.left = pts[i].canvasx + "px";
}
- },
-
- // clickCallback: function(e, x, pts) {
- // s.innerHTML += "<b>Click</b> " + pts_info(x,pts) + "<br/>";
- // },
-
- // zoomCallback: function(minX, maxX) {
- // s.innerHTML += "<b>Zoom</b> [" + minX + ", " + maxX + "]<br/>";
- // }
+ }
}
);
line.style.height = "1px";
line.style.backgroundColor = "black";
line.style.position = "absolute";
- document.getElementById("g").appendChild(line);
+ document.getElementById("div_g").appendChild(line);
lines.push(line);
}
xline.style.top = "0px";
xline.style.backgroundColor = "black";
xline.style.position = "absolute";
- document.getElementById("g").appendChild(xline);
+ document.getElementById("div_g").appendChild(xline);
</script>
</body>
</html>