code review
[dygraphs.git] / plugins / range-selector.js
index d8a3c7a..717f850 100644 (file)
@@ -74,7 +74,7 @@ rangeSelector.prototype.createInterface_ = function() {
 
   // Range selector and animatedZooms have a bad interaction. See issue 359.
   if (this.getOption_('animatedZooms')) {
-    Dygraph.warn('Animated zooms and range selector are not compatible; disabling animatedZooms.');
+    console.warn('Animated zooms and range selector are not compatible; disabling animatedZooms.');
     this.dygraph_.updateOptions({animatedZooms: false}, true);
   }
 
@@ -544,7 +544,7 @@ rangeSelector.prototype.drawStaticLayer_ = function() {
   try {
     this.drawMiniPlot_();
   } catch(ex) {
-    Dygraph.warn(ex);
+    console.warn(ex);
   }
 
   var margin = 0.5;
@@ -597,7 +597,7 @@ rangeSelector.prototype.drawMiniPlot_ = function() {
 
     // Skip points that don't change the x-value. Overly fine-grained points
     // can cause major slowdowns with the ctx.fill() call below.
-    if (prevX !== null && Math.round(x) == Math.round(prevX)) {
+    if (!stepPlot && prevX !== null && Math.round(x) == Math.round(prevX)) {
       continue;
     }