Added setting of zoom flags when dateWindow and valueRange updated.
authorNeal Nelson <neal@makalumedia.com>
Tue, 11 Jan 2011 15:19:58 +0000 (16:19 +0100)
committerNeal Nelson <neal@makalumedia.com>
Tue, 11 Jan 2011 15:19:58 +0000 (16:19 +0100)
dygraph.js

index 320c8ae..a0c063f 100644 (file)
@@ -2934,6 +2934,10 @@ Dygraph.prototype.updateOptions = function(attrs) {
   }
   if ('dateWindow' in attrs) {
     this.dateWindow_ = attrs.dateWindow;
+    this.zoomed_x_ = attrs.dateWindow != null;
+  }
+  if ('valueRange' in attrs) {
+    this.zoomed_y_ = attrs.valueRange != null;
   }
 
   // TODO(danvk): validate per-series options.