4 <title>Temperatures with Range Selector
</title>
6 For production (minified) code, use:
7 <script type=
"text/javascript" src=
"dygraph-combined.js"></script>
9 <script type=
"text/javascript" src=
"../dygraph-dev.js"></script>
11 <script type=
"text/javascript" src=
"data.js"></script>
12 <style type=
"text/css">
14 border:
1px solid red;
19 <p>Demo of a graph with the range selector.
</p>
23 <div id=
"noroll" style=
"width:800px; height:320px;"></div>
25 Roll period of
14 timesteps, custom range selector height and plot color.
27 <div id=
"roll14" style=
"width:800px; height:320px;"></div>
29 Use the average of a specific subset of series to draw the mini plot (only the first series is used in this test).
30 The default behaviour is to compute the average of
<em>all
</em> series.
32 <div id=
"selectcombined" style=
"width:800px; height:320px;"></div>
34 Demo of range selecor without the chart. (interesting if multiple charts should be synced with one range selector).
36 <div id=
"nochart" style=
"width:800px; height:30px;"></div>
37 <p>Demo of range selector with stepPlot
</p>
38 <div id=
"stepplot" style=
"width:800px; height:320px;"></div>
40 <script type=
"text/javascript">
42 document.getElementById(
"noroll"),
46 title: 'Daily Temperatures in New York vs. San Francisco',
47 ylabel: 'Temperature (F)',
49 labelsDivStyles: { 'textAlign': 'right' },
50 showRangeSelector: true
54 document.getElementById(
"roll14"),
60 title: 'Daily Temperatures in New York vs. San Francisco',
61 ylabel: 'Temperature (F)',
63 labelsDivStyles: { 'textAlign': 'right' },
65 showRangeSelector: true,
66 rangeSelectorHeight:
30,
67 rangeSelectorPlotStrokeColor: 'yellow',
68 rangeSelectorPlotFillColor: 'lightyellow'
72 document.getElementById(
"selectcombined"),
80 title: 'Daily Temperatures in New York vs. San Francisco',
81 ylabel: 'Temperature (F)',
82 showRangeSelector: true,
83 labels: ['X', 'Y1', 'Y2', 'Y3'],
85 'Y1': { showInRangeSelector: true }
90 document.getElementById(
"nochart"),
99 showRangeSelector: true,
100 rangeSelectorHeight:
30
103 g5 = new Dygraph(document.getElementById(
"stepplot"),
105 "2008-05-07,70,30\n" +
106 "2008-05-08,42,88\n" +
107 "2008-05-09,88,42\n" +
108 "2008-05-10,33,37\n" +
109 "2008-05-11,30,35\n",
115 showRangeSelector: true