fix all lint errors
[dygraphs.git] / plugins / legend.js
index f16e632..5b4a867 100644 (file)
@@ -16,6 +16,8 @@ Current bits of jankiness:
 
 */
 
+/*jshint globalstrict: true */
+/*global Dygraph:false */
 "use strict";
 
 
@@ -34,6 +36,9 @@ legend.prototype.toString = function() {
   return "Legend Plugin";
 };
 
+// (defined below)
+var generateLegendHTML, generateLegendDashHTML;
+
 /**
  * This is called during the dygraph constructor, after options have been set
  * but before the data is available.
@@ -133,7 +138,7 @@ legend.prototype.deselect = function(e) {
 
 legend.prototype.didDrawChart = function(e) {
   this.deselect(e);
-}
+};
 
 // Right edge should be flush with the right edge of the charting area (which
 // may not be the same as the right edge of the div, if we have two y-axes.
@@ -211,8 +216,8 @@ var generateLegendHTML = function(g, x, sel_points, oneEmWidth) {
   var xOptView = g.optionsViewForAxis_('x');
   var xvf = xOptView('valueFormatter');
   html = xvf(x, xOptView, labels[0], g);
-  if(html !== '') {
-       html += ':';
+  if (html !== '') {
+    html += ':';
   }
 
   var yOptViews = [];