Run tests on Travis-CI.
[dygraphs.git] / gallery / stock.js
index cb7fe3e..ad7319e 100644 (file)
@@ -1,3 +1,5 @@
+/*global Gallery,Dygraph,data */
+/*global stockData */
 Gallery.register(
   'stock',
   {
@@ -5,8 +7,8 @@ Gallery.register(
     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;'>",
+          "<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");
@@ -17,15 +19,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); }
       var setLog = function(val) {
         g.updateOptions({ logscale: val });
         linear.disabled = !val;
         log.disabled = val;
-      }
+      };
+      linear.onclick = function() { setLog(false); };
+      log.onclick = function() { setLog(true); };
     }
-  });
\ No newline at end of file
+  });