Add new issue and PR templates
[dygraphs.git] / gallery / temperature-sf-ny.js
index 8f43d1e..f2c9ad1 100644 (file)
@@ -1,3 +1,5 @@
+/*global Gallery,Dygraph,data */
+/*global data_temp */
 Gallery.register(
   // Get a better name.
   'temperature-sf-ny',
@@ -5,14 +7,15 @@ Gallery.register(
     name: 'Roll Periods and Error Bars',
     title: 'Demo of a graph with many data points and custom error bars.',
     setup: function(parent) {
-      parent.innerHTML =
-          "<p>Roll period of 14 timesteps.</p>" +
-          "<div id='roll14' style='width:800px; height:320px;'></div>" +
-          "<p>No roll period.</p>" +
-          "<div id='noroll' style='width:800px; height:320px;'></div>";
+      parent.innerHTML = [
+          "<p>Roll period of 14 timesteps.</p>",
+          "<div id='roll14' style='width:600px; height:300px;'></div>",
+          "<p>No roll period.</p>",
+          "<div id='noroll' style='width:600px; height:300px;'></div>"]
+          .join("\n");
     },
     run: function() {
-      g1 = new Dygraph(
+      new Dygraph(
           document.getElementById("noroll"),
           data_temp,
           {
@@ -23,7 +26,7 @@ Gallery.register(
             labelsDivStyles: { 'textAlign': 'right' }
           }
       );
-      g2 = new Dygraph(
+      new Dygraph(
           document.getElementById("roll14"),
           data_temp,
           {
@@ -37,4 +40,4 @@ Gallery.register(
           }
       );
     }
-  });
\ No newline at end of file
+  });