only apply optimization when stepPlot=false range-selector-granularity
authorDan Vanderkam <danvdk@gmail.com>
Tue, 4 Nov 2014 23:51:57 +0000 (18:51 -0500)
committerDan Vanderkam <danvdk@gmail.com>
Tue, 4 Nov 2014 23:51:57 +0000 (18:51 -0500)
plugins/range-selector.js

index d8a3c7a..8e74ad9 100644 (file)
@@ -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;
     }