BUGFIX: First try of fixing missing data bug for customBars and errorBars
authorDavid Eberlein <david.eberlein@ch.sauter-bc.com>
Fri, 12 Apr 2013 14:12:16 +0000 (16:12 +0200)
committerDavid Eberlein <david.eberlein@ch.sauter-bc.com>
Fri, 12 Apr 2013 14:12:16 +0000 (16:12 +0200)
dygraph.js

index f11fa74..dd0a524 100644 (file)
@@ -2768,7 +2768,14 @@ Dygraph.prototype.extractSeries_ = function(rawData, i, logScale) {
         point = null;
       }
     }
-    series.push([x, point]);
+    // Fix null points to fit the display type standard.
+    if(point === null && this.attr_("errorBars")){
+      series.push([x, [null,null]]);
+    }else if(point === null && this.attr_("customBars")){
+      series.push([x, [null,null,null]]);
+    } else {
+      series.push([x, point]);
+    }
   }
   return series;
 };