Remove dead code (#818)
[dygraphs.git] / gallery / temperature-sf-ny.js
index d903b8b..7e41310 100644 (file)
@@ -1,3 +1,5 @@
+/*global Gallery,Dygraph,data */
+/*global data_temp */
 Gallery.register(
   // Get a better name.
   'temperature-sf-ny',
@@ -6,14 +8,15 @@ Gallery.register(
     title: 'Demo of a graph with many data points and custom error bars.',
     setup: function(parent) {
       parent.innerHTML = [
+          "<style>.dygraph-legend { text-align: right; }</style>",
           "<p>Roll period of 14 timesteps.</p>",
-          "<div id='roll14' style='width:800px; height:320px;'></div>",
+          "<div id='roll14' style='width:600px; height:300px;'></div>",
           "<p>No roll period.</p>",
-          "<div id='noroll' style='width:800px; height:320px;'></div>"]
+          "<div id='noroll' style='width:600px; height:300px;'></div>"]
           .join("\n");
     },
     run: function() {
-      g1 = new Dygraph(
+      new Dygraph(
           document.getElementById("noroll"),
           data_temp,
           {
@@ -21,10 +24,9 @@ Gallery.register(
             title: 'Daily Temperatures in New York vs. San Francisco',
             ylabel: 'Temperature (F)',
             legend: 'always',
-            labelsDivStyles: { 'textAlign': 'right' }
           }
       );
-      g2 = new Dygraph(
+      new Dygraph(
           document.getElementById("roll14"),
           data_temp,
           {
@@ -34,8 +36,7 @@ Gallery.register(
             title: 'Daily Temperatures in New York vs. San Francisco',
             ylabel: 'Temperature (F)',
             legend: 'always',
-            labelsDivStyles: { 'textAlign': 'right' }
           }
       );
     }
-  });
\ No newline at end of file
+  });