Bump versions and add release notes
[dygraphs.git] / tests / styled-chart-labels.html
1 <!DOCTYPE html>
2 <html>
3 <head>
4 <link rel="stylesheet" href="../dist/dygraph.css">
5 <title>two series</title>
6 <script type="text/javascript" src="../dist/dygraph.js"></script>
7
8 <script type="text/javascript" src="data.js"></script>
9 <style type="text/css">
10 #div_g .dygraph-label {
11 /* This applies to the title, x-axis label and y-axis label */
12 font-family: Arial, Helvetica, sans-serif;
13 }
14 #div_g .dygraph-title {
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 }
19 #div_g .dygraph-ylabel {
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 }
24 .chart {
25 border: 1px dashed black;
26 margin: 5px;
27 padding: 2px;
28 }
29 .dygraph-legend {
30 text-align: right;
31 background: none;
32 }
33 </style>
34 </head>
35 <body>
36 <p>In this chart, each chart label is styled independently. View source to
37 see how it works.</p>
38
39 <div class="chart" id="div_g" style="width:600px; height:300px;"></div>
40
41 <p>This version of the chart uses the default styles:</p>
42 <div class="chart" id="div_g2" style="width:600px; height:300px;"></div>
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)',
53 xlabel: 'Date (Ticks indicate the start of the indicated time period)',
54 strokeWidth: 1.5
55 }
56 );
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)',
65 xlabel: 'Date (Ticks indicate the start of the indicated time period)',
66 strokeWidth: 1.5
67 }
68 );
69 </script>
70 </body>
71 </html>