Fix lint errors in gallery and add its JS files to lint.sh
[dygraphs.git] / gallery / stock.js
index 0cee3fb..511aef1 100644 (file)
@@ -4,11 +4,12 @@ Gallery.register(
     name: 'Stock Chart Demo',
     title: 'Stock Chart Demo',
     setup: function(parent) {
-      parent.innerHTML = "<div id='stock_div' style='width: 800px; height: 400px;'></div><br/>" +
-          "<div style='width: 800px; text-align: center;'>" +
-          "<button id='linear'>Linear Scale</button>&nbsp;" +
-          "<button id='log' disabled='true'>Log Scale</button>" +
-          "</div>";
+      parent.innerHTML = [
+          "<div id='stock_div' style='width: 600px; height: 300px;'></div><br/>",
+          "<div style='width: 600px; text-align: center;'>",
+          "  <button id='linear'>Linear Scale</button>&nbsp;",
+          "  <button id='log' disabled='true'>Log Scale</button>",
+          "</div>"].join("\n");
     },
     run: function() {
       var g = new Dygraph(document.getElementById("stock_div"), stockData,
@@ -16,15 +17,15 @@ Gallery.register(
             customBars: true,
             logscale: true
           });
-  
+
       var linear = document.getElementById("linear");
       var log = document.getElementById("log");
-      linear.onclick = function() { setLog(false); }
-      log.onclick = function() { setLog(true); }
+      linear.onclick = function() { setLog(false); };
+      log.onclick = function() { setLog(true); };
       var setLog = function(val) {
         g.updateOptions({ logscale: val });
         linear.disabled = !val;
         log.disabled = val;
-      }
+      };
     }
-  });
\ No newline at end of file
+  });