Merge pull request #761 from justinsg/master
[dygraphs.git] / gallery / styled-chart-labels.js
index 6139526..0268f6d 100644 (file)
@@ -1,17 +1,18 @@
+/*global Gallery,Dygraph,data */
 Gallery.register(
   'styled-chart-labels',
   {
     name: 'CSS label styling',
     title: 'Each chart label is styled independently with CSS',
     setup: function(parent) {
-      parent.innerHTML =
-          "<p class='infotext'>This chart's labels are styled</p>" +
-          "<div class='chart' id='div_g' style='width:600px; height:300px;'></div>" +
-          "<p class='infotext'>This version of the chart uses the default styles:</p>" +
-          "<div class='chart' id='div_g2' style='width:600px; height:300px;'></div>";
+      parent.innerHTML = [
+          "<p class='infotext'>This chart's labels are styled</p>",
+          "<div class='chart' id='div_g' style='width:600px; height:300px;'></div>",
+          "<p class='infotext'>This version of the chart uses the default styles:</p>",
+          "<div class='chart' id='div_g2' style='width:600px; height:300px;'></div>"].join("\n");
     },
     run: function() {
-      g = new Dygraph(
+      new Dygraph(
             document.getElementById("div_g"),
             data, {
               rollPeriod: 7,
@@ -28,7 +29,7 @@ Gallery.register(
             }
           );
 
-      g2 = new Dygraph(
+      new Dygraph(
             document.getElementById("div_g2"),
             data, {
               rollPeriod: 30,