Only show the secondary y-axis label when there is a secondary y-axis.
[dygraphs.git] / dygraph-canvas.js
index acf011f..5e6766d 100644 (file)
@@ -551,7 +551,7 @@ DygraphCanvasRenderer.prototype._renderChartLabels = function() {
     this.container.appendChild(div);
     this.chartLabels.ylabel = div;
   }
-  if (this.attr_('y2label')) {
+  if (this.attr_('y2label') && this.dygraph_.numAxes() == 2) {
     div = createRotatedDiv(2, 'dygraph-label dygraph-y2label',
                            this.attr_('y2label'));
     this.container.appendChild(div);