Incorporate patch from Mark Swanson
authorDan Vanderkam <danvdk@gmail.com>
Sun, 13 Dec 2009 23:00:56 +0000 (15:00 -0800)
committerDan Vanderkam <danvdk@gmail.com>
Sun, 13 Dec 2009 23:00:56 +0000 (15:00 -0800)
dygraph-canvas.js

index 49dddd4..a848001 100644 (file)
@@ -340,7 +340,7 @@ DygraphCanvasRenderer.prototype._renderAxis = function() {
   context.lineWidth = this.options.axisLineWidth;
 
   if (this.options.drawYAxis) {
-    if (this.layout.yticks) {
+    if (this.layout.yticks && this.layout.yticks.length > 0) {
       for (var i = 0; i < this.layout.yticks.length; i++) {
         var tick = this.layout.yticks[i];
         if (typeof(tick) == "function") return;