From: Robert Konigsberg Date: Sun, 15 Jan 2012 16:43:02 +0000 (-0500) Subject: Add temperature-sf-ny. We should rename it. X-Git-Tag: v1.0.0~320^2~18 X-Git-Url: https://adrianiainlam.tk/git/?a=commitdiff_plain;h=fec166620c2f414377dbb7f48bda943c261df4e4;p=dygraphs.git Add temperature-sf-ny. We should rename it. --- diff --git a/gallery/gallery.css b/gallery/gallery.css index c0b81d7..37462cf 100644 --- a/gallery/gallery.css +++ b/gallery/gallery.css @@ -119,6 +119,10 @@ aside { #workarea #styled-chart-labels .chart { border: 1px dashed black; - margin: 5px 5px 5px 50px; + margin: 5px 5px 5px 50px; padding: 2px; -} \ No newline at end of file +} + +@workarea #temperature-sf-ny #bordered { + border: 1px solid red; +} diff --git a/gallery/index.html b/gallery/index.html index 5e77abc..f1bdf1e 100644 --- a/gallery/index.html +++ b/gallery/index.html @@ -26,6 +26,7 @@ + diff --git a/gallery/temperature-sf-ny.js b/gallery/temperature-sf-ny.js new file mode 100644 index 0000000..8f43d1e --- /dev/null +++ b/gallery/temperature-sf-ny.js @@ -0,0 +1,40 @@ +Gallery.register( + // Get a better name. + 'temperature-sf-ny', + { + 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.

" + + "
"; + }, + run: function() { + g1 = new Dygraph( + document.getElementById("noroll"), + data_temp, + { + customBars: true, + title: 'Daily Temperatures in New York vs. San Francisco', + ylabel: 'Temperature (F)', + legend: 'always', + labelsDivStyles: { 'textAlign': 'right' } + } + ); + g2 = new Dygraph( + document.getElementById("roll14"), + data_temp, + { + rollPeriod: 14, + showRoller: true, + customBars: true, + title: 'Daily Temperatures in New York vs. San Francisco', + ylabel: 'Temperature (F)', + legend: 'always', + labelsDivStyles: { 'textAlign': 'right' } + } + ); + } + }); \ No newline at end of file