Whoops, remove now-invalid code in setColors_.
[dygraphs.git] / plugins / chart-labels.js
index d6c1095..da231d8 100644 (file)
@@ -3,6 +3,8 @@
  * Copyright 2012 Dan Vanderkam (danvdk@gmail.com)
  * MIT-licensed (http://opensource.org/licenses/MIT)
  */
+/*global Dygraph:false */
+
 Dygraph.Plugins.ChartLabels = (function() {
 
 "use strict";
@@ -109,7 +111,7 @@ var createRotatedDiv = function(g, box, axis, classes, html) {
   inner_div.appendChild(class_div);
   div.appendChild(inner_div);
   return div;
-}
+};
 
 chart_labels.prototype.layout = function(e) {
   this.detachLabels_();
@@ -123,6 +125,7 @@ chart_labels.prototype.layout = function(e) {
     this.title_div_.style.textAlign = 'center';
     this.title_div_.style.fontSize = (g.getOption('titleHeight') - 8) + 'px';
     this.title_div_.style.fontWeight = 'bold';
+    this.title_div_.style.zIndex = 10;
 
     var class_div = document.createElement("div");
     class_div.className = 'dygraph-label dygraph-title';
@@ -191,7 +194,7 @@ chart_labels.prototype.clearChart = function() {
 };
 
 chart_labels.prototype.destroy = function() {
-  detachLabels();
+  this.detachLabels_();
 };