4 <meta http-equiv=
"X-UA-Compatible" content=
"IE=EmulateIE7; IE=EmulateIE9">
5 <title>synchronize
</title>
7 <script type=
"text/javascript" src=
"../excanvas.js"></script>
9 <script type=
"text/javascript" src=
"../strftime/strftime-min.js"></script>
10 <script type=
"text/javascript" src=
"../rgbcolor/rgbcolor.js"></script>
11 <script type=
"text/javascript" src=
"../dygraph-canvas.js"></script>
12 <script type=
"text/javascript" src=
"../dygraph.js"></script>
13 <script type=
"text/javascript" src=
"data.js"></script>
14 <style type=
"text/css">
15 #div1 { position: absolute; left:
10px; top:
30px; }
16 #div2 { position: absolute; left:
520px; top:
30px; }
17 #div3 { position: absolute; left:
10px; top:
340px; }
18 #div4 { position: absolute; left:
520px; top:
340px; }
22 <p>Zooming and panning on any of the charts will zoom and pan all the
25 <div id=
"div1" style=
"width:500px; height:300px;"></div>
26 <div id=
"div2" style=
"width:500px; height:300px;"></div>
27 <div id=
"div3" style=
"width:500px; height:300px;"></div>
28 <div id=
"div4" style=
"width:500px; height:300px;"></div>
30 <script type=
"text/javascript">
32 var blockRedraw = false;
33 var initialized = false;
34 for (var i =
1; i <=
4; i++) {
37 document.getElementById(
"div" + i),
41 drawCallback: function(me, initial) {
42 if (blockRedraw || initial) return;
44 var range = me.xAxisRange();
45 var yrange = me.yAxisRange();
46 for (var j =
0; j <
4; j++) {
47 if (gs[j] == me) continue;
48 gs[j].updateOptions( {