From fec166620c2f414377dbb7f48bda943c261df4e4 Mon Sep 17 00:00:00 2001 From: Robert Konigsberg Date: Sun, 15 Jan 2012 11:43:02 -0500 Subject: [PATCH 1/1] Add temperature-sf-ny. We should rename it. --- gallery/gallery.css | 8 ++++++-- gallery/index.html | 1 + gallery/temperature-sf-ny.js | 40 ++++++++++++++++++++++++++++++++++++++++ 3 files changed, 47 insertions(+), 2 deletions(-) create mode 100644 gallery/temperature-sf-ny.js 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 -- 2.7.4