Commit | Line | Data |
---|---|---|
fec16662 RK |
1 | Gallery.register( |
2 | // Get a better name. | |
3 | 'temperature-sf-ny', | |
4 | { | |
5 | name: 'Roll Periods and Error Bars', | |
6 | title: 'Demo of a graph with many data points and custom error bars.', | |
7 | setup: function(parent) { | |
8 | parent.innerHTML = | |
9 | "<p>Roll period of 14 timesteps.</p>" + | |
10 | "<div id='roll14' style='width:800px; height:320px;'></div>" + | |
11 | "<p>No roll period.</p>" + | |
12 | "<div id='noroll' style='width:800px; height:320px;'></div>"; | |
13 | }, | |
14 | run: function() { | |
15 | g1 = new Dygraph( | |
16 | document.getElementById("noroll"), | |
17 | data_temp, | |
18 | { | |
19 | customBars: true, | |
20 | title: 'Daily Temperatures in New York vs. San Francisco', | |
21 | ylabel: 'Temperature (F)', | |
22 | legend: 'always', | |
23 | labelsDivStyles: { 'textAlign': 'right' } | |
24 | } | |
25 | ); | |
26 | g2 = new Dygraph( | |
27 | document.getElementById("roll14"), | |
28 | data_temp, | |
29 | { | |
30 | rollPeriod: 14, | |
31 | showRoller: true, | |
32 | customBars: true, | |
33 | title: 'Daily Temperatures in New York vs. San Francisco', | |
34 | ylabel: 'Temperature (F)', | |
35 | legend: 'always', | |
36 | labelsDivStyles: { 'textAlign': 'right' } | |
37 | } | |
38 | ); | |
39 | } | |
40 | }); |