X-Git-Url: https://adrianiainlam.tk/git/?a=blobdiff_plain;f=gallery%2Ftemperature-sf-ny.js;h=7e4131016135481d178c5ab15f562655f5e62d01;hb=6e20721120a88fcf451c19559dfc62e2d316dd85;hp=8f43d1e7655219f1d085842747d08f6262fc2321;hpb=e14dc3feda3e6d429bb953dab83c593d851d90af;p=dygraphs.git diff --git a/gallery/temperature-sf-ny.js b/gallery/temperature-sf-ny.js index 8f43d1e..7e41310 100644 --- a/gallery/temperature-sf-ny.js +++ b/gallery/temperature-sf-ny.js @@ -1,3 +1,5 @@ +/*global Gallery,Dygraph,data */ +/*global data_temp */ Gallery.register( // Get a better name. 'temperature-sf-ny', @@ -5,14 +7,16 @@ 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 = - "

Roll period of 14 timesteps.

" + - "
" + - "

No roll period.

" + - "
"; + parent.innerHTML = [ + "", + "

Roll period of 14 timesteps.

", + "
", + "

No roll period.

", + "
"] + .join("\n"); }, run: function() { - g1 = new Dygraph( + new Dygraph( document.getElementById("noroll"), data_temp, { @@ -20,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, { @@ -33,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 + });