Remove some dead data handler coder (#787)
[dygraphs.git] / tests / demo.html
CommitLineData
54425b14 1<!DOCTYPE html>
285a6bda
DV
2<html>
3 <head>
93a5bb4c 4 <link rel="stylesheet" href="../css/dygraph.css">
6f091595 5 <title>demo</title>
6ecc0739 6 <!--
fbd6834a 7 <script type="text/javascript" src="../dist/dygraph.js"></script>
6ecc0739 8 -->
fbd6834a 9 <script type="text/javascript" src="../dist/dygraph.js"></script>
285a6bda
DV
10 </head>
11 <body>
12 <h2>Demo</h2>
13 <font size=-1>(Mouse over to highlight individual values. Click and drag to zoom. Double-click to zoom out.)</font><br/>
14 <table><tr><td>
c21d2c2d 15 <div id="demodiv"></div>
285a6bda
DV
16 </td><td valign=top>
17 <div id="status" style="width:200px; font-size:0.8em; padding-top:5px;"></div>
18 </td>
19 </tr></table>
20 <script type="text/javascript">
00259bf3 21 g = new Dygraph(
285a6bda
DV
22 document.getElementById("demodiv"),
23 function() {
24 var zp = function(x) { if (x < 10) return "0"+x; else return x; };
25 var r = "date,parabola,line,another line,sine wave\n";
26 for (var i=1; i<=31; i++) {
27 r += "200610" + zp(i);
28 r += "," + 10*(i*(31-i));
29 r += "," + 10*(8*i);
30 r += "," + 10*(250 - 8*i);
31 r += "," + 10*(125 + 125 * Math.sin(0.3*i));
32 r += "\n";
33 }
34 return r;
35 },
285a6bda 36 {
285a6bda
DV
37 labelsDiv: document.getElementById('status'),
38 labelsSeparateLines: true,
39 labelsKMB: true,
74a5af31 40 legend: 'always',
551aa865 41 colors: ["rgb(51,204,204)",
285a6bda
DV
42 "rgb(255,100,100)",
43 "#00DD55",
44 "rgba(50,50,200,0.4)"],
ad1798c2
DV
45 width: 640,
46 height: 480,
47 title: 'Interesting Shapes',
48 xlabel: 'Date',
74a5af31 49 ylabel: 'Count',
6ecc0739
DV
50 axisLineColor: 'white',
51 showRangeSelector: true
189f8030 52 // drawXGrid: false
285a6bda
DV
53 }
54 );
55 </script>
56</body>
57</html>