Commit | Line | Data |
---|---|---|
ca49434a DV |
1 | <!DOCTYPE html> |
2 | <html> | |
3 | <head> | |
93a5bb4c | 4 | <link rel="stylesheet" href="../css/dygraph.css"> |
ca49434a | 5 | <title>two series</title> |
7e5ddc94 DV |
6 | <!-- |
7 | For production (minified) code, use: | |
8 | <script type="text/javascript" src="dygraph-combined.js"></script> | |
9 | --> | |
fbd6834a | 10 | <script type="text/javascript" src="../dist/dygraph.js"></script> |
7e5ddc94 | 11 | |
ca49434a DV |
12 | <script type="text/javascript" src="data.js"></script> |
13 | <style type="text/css"> | |
3bc2cb3c | 14 | #div_g .dygraph-label { |
ca49434a DV |
15 | /* This applies to the title, x-axis label and y-axis label */ |
16 | font-family: Arial, Helvetica, sans-serif; | |
17 | } | |
3bc2cb3c | 18 | #div_g .dygraph-title { |
ca49434a DV |
19 | /* This rule only applies to the chart title */ |
20 | font-size: 24px; | |
21 | text-shadow: gray 2px 2px 2px; /* color, delta-x, delta-y, blur radius */ | |
22 | } | |
3bc2cb3c | 23 | #div_g .dygraph-ylabel { |
ca49434a DV |
24 | /* This rule only applies to the y-axis label */ |
25 | font-size: 18px; | |
26 | text-shadow: gray -2px 2px 2px; /* (offsets are in a rotated frame) */ | |
27 | } | |
b4202b3d DV |
28 | .chart { |
29 | border: 1px dashed black; | |
30 | margin: 5px; | |
31 | padding: 2px; | |
32 | } | |
93a5bb4c DV |
33 | .dygraph-legend { |
34 | text-align: right; | |
35 | background: none; | |
36 | } | |
ca49434a DV |
37 | </style> |
38 | </head> | |
39 | <body> | |
3bc2cb3c DV |
40 | <p>In this chart, each chart label is styled independently. View source to |
41 | see how it works.</p> | |
42 | ||
b4202b3d | 43 | <div class="chart" id="div_g" style="width:600px; height:300px;"></div> |
ca49434a | 44 | |
3bc2cb3c | 45 | <p>This version of the chart uses the default styles:</p> |
b4202b3d | 46 | <div class="chart" id="div_g2" style="width:600px; height:300px;"></div> |
ca49434a DV |
47 | |
48 | <script type="text/javascript"> | |
49 | g = new Dygraph( | |
50 | document.getElementById("div_g"), | |
51 | data, { | |
52 | rollPeriod: 7, | |
53 | legend: 'always', | |
54 | title: 'High and Low Temperatures', | |
55 | titleHeight: 32, | |
56 | ylabel: 'Temperature (F)', | |
b4202b3d | 57 | xlabel: 'Date (Ticks indicate the start of the indicated time period)', |
ca49434a DV |
58 | strokeWidth: 1.5 |
59 | } | |
60 | ); | |
3bc2cb3c DV |
61 | |
62 | g2 = new Dygraph( | |
63 | document.getElementById("div_g2"), | |
64 | data, { | |
65 | rollPeriod: 30, | |
66 | legend: 'always', | |
67 | title: 'High and Low Temperatures (30-day average)', | |
68 | ylabel: 'Temperature (F)', | |
b4202b3d | 69 | xlabel: 'Date (Ticks indicate the start of the indicated time period)', |
3bc2cb3c DV |
70 | strokeWidth: 1.5 |
71 | } | |
72 | ); | |
ca49434a DV |
73 | </script> |
74 | </body> | |
75 | </html> |