X-Git-Url: https://adrianiainlam.tk/git/?a=blobdiff_plain;ds=inline;f=tests%2Fsynchronize.html;h=c79985821adf8bb29fb7b3e272d93b234b226703;hb=916a000e22d330b5f8690af07f561da1bdf7f8e3;hp=a26c4c0e8e8c4ecd528a686f7f4c37a6e4bcbfeb;hpb=02f49d0b56e9bfafc4d0964e09d1e0b815aa6854;p=dygraphs.git diff --git a/tests/synchronize.html b/tests/synchronize.html index a26c4c0..c799858 100644 --- a/tests/synchronize.html +++ b/tests/synchronize.html @@ -1,10 +1,13 @@ +
+Zooming and panning on any of the charts will zoom and pan all the others.
- + @@ -35,13 +38,17 @@ NoisyData, { rollPeriod: 7, errorBars: true, - drawCallback: function(me) { - if (blockRedraw || !initialized) return; + drawCallback: function(me, initial) { + if (blockRedraw || initial) return; blockRedraw = true; - var range = me.xAxisRange(); + var range = me.xAxisRange(); + var yrange = me.yAxisRange(); for (var j = 0; j < 4; j++) { if (gs[j] == me) continue; - gs[j].updateOptions( { dateWindow: range } ); + gs[j].updateOptions( { + dateWindow: range, + valueRange: yrange + } ); } blockRedraw = false; } @@ -49,8 +56,6 @@ ) ); } - - initialized = true;