</head>
<body>
<p>Hover, click and zoom to test the callbacks:</p>
- <div id="g" style="width:600px; height:300px;"></div>
+ <div id="div_g" style="width:600px; height:300px;"></div>
<div id="status" style="width:100%; height:200px;"></div>
};
g = new Dygraph(
- document.getElementById("g"),
+ document.getElementById("div_g"),
NoisyData, {
rollPeriod: 7,
showRoller: true,
</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>
</head>
<body>
<p>Labels are transparent and repositioned:</p>
- <div id="g14" style="width:600px; height:300px;"></div>
+ <div id="div_g14" style="width:600px; height:300px;"></div>
<script type="text/javascript">
g14 = new Dygraph(
- document.getElementById("g14"),
+ document.getElementById("div_g14"),
NoisyData, {
rollPeriod: 14,
errorBars: true,
<!--[if IE]>
<script type="text/javascript" src="excanvas.js"></script>
<![endif]-->
- <script type="text/javascript" src="../dygraph-combined.js"></script>
+ <!--<script type="text/javascript" src="../dygraph-combined.js"></script>-->
+ <script type="text/javascript" src="../strftime/strftime-min.js"></script>
+ <script type="text/javascript" src="../rgbcolor/rgbcolor.js"></script>
<script type="text/javascript" src="../dygraph-canvas.js"></script>
<script type="text/javascript" src="../dygraph.js"></script>
<script type="text/javascript" src="data.js"></script>
<body>
<p>Dot and lines should be extra large. Grid is red.</p>
- <div id="g14" style="width:600px; height:300px;"></div>
+ <div id="div_g14" style="width:600px; height:300px;"></div>
<script type="text/javascript">
g14 = new Dygraph(
- document.getElementById("g14"),
+ document.getElementById("div_g14"),
NoisyData, {
rollPeriod: 14,
errorBars: true,
</head>
<body>
<p>Hourly data:</p>
- <div id="g" style="width:600px; height:300px;"></div>
+ <div id="div_g" style="width:600px; height:300px;"></div>
<p>Minutely data:</p>
- <div id="gm" style="width:600px; height:300px;"></div>
+ <div id="div_gm" style="width:600px; height:300px;"></div>
<p>Secondly data:</p>
- <div id="gs" style="width:600px; height:300px;"></div>
+ <div id="div_gs" style="width:600px; height:300px;"></div>
<script type="text/javascript">
g = new Dygraph(
- document.getElementById("g"),
+ document.getElementById("div_g"),
function HourlyData() {
return "" +
"Date,A,B\n" +
);
gm = new Dygraph(
- document.getElementById("gm"),
+ document.getElementById("div_gm"),
function() {
var ret = "Date,Hours,Minutes\n";
var zp = function(x) { if (x<10) return "0"+x; else return ""+x;};
);
gs = new Dygraph(
- document.getElementById("gs"),
+ document.getElementById("div_gs"),
function() {
var ret = "Date,Minutes,Seconds\n";
var zp = function(x) { if (x<10) return "0"+x; else return ""+x;};
[4, [null, 2], [20, 3]],
[5, [null, 2], [null, 3]],
[6, [ 9, 2], [20, 3]],
- [7, [10, 2], [20, 3]],
+ [7, [10, 2], [20, 3]]
],
{
errorBars: true,
[4, [null, 2], [20, 3]],
[5, [null, 2], [null, 3]],
[6, [ 9, 2], [20, 3]],
- [7, [10, 2], [20, 3]],
+ [7, [10, 2], [20, 3]]
],
{
errorBars: true,
<div id="graphdiv2"></div>
<script type="text/javascript">
g2 = new Dygraph(document.getElementById("graphdiv2"),
- [
+ [
[1,10,100],
[2,20,80],
[3,50,60],
- [4,70,80],
+ [4,70,80]
],
{
labels: [ "x", "A", "B" ]
</head>
<body>
<p>7-day rollup:</p>
- <div id="g" style="width:600px; height:300px;"></div>
+ <div id="div_g" style="width:600px; height:300px;"></div>
<p>14-Day Rollup:</p>
- <div id="g30" style="width:600px; height:300px;"></div>
+ <div id="div_g30" style="width:600px; height:300px;"></div>
<script type="text/javascript">
g = new Dygraph(
- document.getElementById("g"),
+ document.getElementById("div_g"),
NoisyData, {
rollPeriod: 7,
errorBars: true
}
);
g30 = new Dygraph(
- document.getElementById("g30"),
+ document.getElementById("div_g30"),
NoisyData().replace(/,/g, "\t"), {
rollPeriod: 14,
errorBars: true
</head>
<body>
<p>CSV data source:</p>
- <div id="g" style="width:600px; height:300px;"></div>
+ <div id="div_g" style="width:600px; height:300px;"></div>
<p>GViz data source:</p>
<div id="gviz" style="width:600px; height:300px;"></div>
<script type="text/javascript">
g = new Dygraph(
- document.getElementById("g"),
+ document.getElementById("div_g"),
function() {
var ret = "X,Y1,Y2\n";
for (var i = 0; i < 100; i++) {
<script type="text/javascript" src="data.js"></script>
</head>
<body>
- <div id="g" style="width:600px; height:300px;"></div>
+ <div id="div_g" style="width:600px; height:300px;"></div>
<div id="status"></div>
<script type="text/javascript">
for (var i = 0; i < num_tests; i++) {
var this_start = new Date;
g = new Dygraph(
- document.getElementById("g"),
+ document.getElementById("div_g"),
NoisyData, {
rollPeriod: 7,
errorBars: true
document.getElementById("status").innerHTML = "Elapsed time: " + (end - start)/num_tests + " ms/instantiation";
new Dygraph(
- document.getElementById("g"),
+ document.getElementById("div_g"),
times, {
labels: [ "Iteration", "Time (ms)" ]
}
var eq = document.getElementById("eq").value;
eval("fn = " + eq);
- var graph = document.getElementById("graph");
+ var graph = document.getElementById("graph_div");
var width = parseInt(graph.style.width);
var x1 = parseFloat(document.getElementById("x1").value);
var x2 = parseFloat(document.getElementById("x2").value);
to <input type=text width="5" id="x2" value="10" /></p>
<p><input type=button value="Plot" onClick="plot()" /></p>
- <div id=graph style="width:1024px; height:400px;"></div>
+ <div id="graph_div" style="width:1024px; height:400px;"></div>
</body>
</html>
</head>
<body>
<p>Wide</p>
- <div id="g" style="width:800px; height:300px;"></div>
+ <div id="div_g" style="width:800px; height:300px;"></div>
<p>Narrow</p>
- <div id="g2" style="width:300px; height:200px;"></div>
+ <div id="div_g2" style="width:300px; height:200px;"></div>
<script type="text/javascript">
g = new Dygraph(
- document.getElementById("g"),
+ document.getElementById("div_g"),
data, {
rollPeriod: 7,
pixelsPerYLabel: 20
}
);
g2 = new Dygraph(
- document.getElementById("g2"),
+ document.getElementById("div_g2"),
data, {
rollPeriod: 7,
pixelsPerYLabel: 20
</head>
<body>
<p>No rollup:</p>
- <div id="g" style="width:600px; height:300px;"></div>
+ <div id="div_g" style="width:600px; height:300px;"></div>
<p>30-Day Rollup:</p>
- <div id="g30" style="width:600px; height:300px;"></div>
+ <div id="div_g30" style="width:600px; height:300px;"></div>
<script type="text/javascript">
g = new Dygraph(
- document.getElementById("g"),
+ document.getElementById("div_g"),
data, {}
);
g30 = new Dygraph(
- document.getElementById("g30"),
+ document.getElementById("div_g30"),
data, {
rollPeriod: 30
}