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