add HTML5 doctype to all tests
[dygraphs.git] / tests / per-series.html
1 <!DOCTYPE html>
2 <html>
3 <head>
4 <title>Per-Series Properties</title>
5 <!--[if IE]>
6 <script type="text/javascript" src="../excanvas.js"></script>
7 <![endif]-->
8 <script type="text/javascript" src="../strftime/strftime-min.js"></script>
9 <script type="text/javascript" src="../rgbcolor/rgbcolor.js"></script>
10 <script type="text/javascript" src="../dygraph-canvas.js"></script>
11 <script type="text/javascript" src="../dygraph.js"></script>
12 </head>
13 <body>
14 <h2>Chart with per-series properties</h2>
15 <div id="demodiv"></div>
16 <br/><br/>
17 <div id="demodiv2"></div>
18
19 <script type="text/javascript">
20 g = new Dygraph(
21 document.getElementById("demodiv"),
22 function() {
23 var zp = function(x) { if (x < 10) return "0"+x; else return x; };
24 var r = "date,parabola,line,another line,sine wave\n";
25 for (var i=1; i<=31; i++) {
26 r += "200610" + zp(i);
27 r += "," + 10*(i*(31-i));
28 r += "," + 10*(8*i);
29 r += "," + 10*(250 - 8*i);
30 r += "," + 10*(125 + 125 * Math.sin(0.3*i));
31 r += "\n";
32 }
33 return r;
34 },
35 {
36 strokeWidth: 2,
37 'parabola': {
38 strokeWidth: 0.0,
39 drawPoints: true,
40 pointSize: 4,
41 highlightCircleSize: 6
42 },
43 'line': {
44 strokeWidth: 1.0,
45 drawPoints: true,
46 pointSize: 1.5
47 },
48 'sine wave': {
49 strokeWidth: 3,
50 highlightCircleSize: 10
51 }
52 }
53 );
54 </script>
55 </body>
56 </html>