Commit | Line | Data |
---|---|---|
87c1f382 DV |
1 | <html> |
2 | <head> | |
3 | <title>fillGraph</title> | |
4 | <!--[if IE]> | |
5 | <script type="text/javascript" src="excanvas.js"></script> | |
6 | <![endif]--> | |
7 | <script type="text/javascript" src="../dygraph-combined.js"></script> | |
8 | <script type="text/javascript" src="../dygraph-canvas.js"></script> | |
9 | <script type="text/javascript" src="../dygraph.js"></script> | |
10 | </head> | |
11 | <body> | |
12 | <p>Filled, no error bars:</p> | |
13 | <div id="div_g" style="width:600px; height:300px;"></div> | |
14 | ||
15 | <p>Filled, negatives:</p> | |
16 | <div id="div_g2" style="width:600px; height:300px;"></div> | |
17 | ||
18 | <p>Filled, error bars:</p> | |
19 | <div id="div_g3" style="width:600px; height:300px;"></div> | |
20 | ||
21 | <script type="text/javascript"> | |
22 | new Dygraph( | |
23 | document.getElementById("div_g"), | |
24 | function() { | |
25 | var ret = "X,Y1,Y2\n"; | |
26 | for (var i = 0; i < 100; i++) { | |
27 | ret += i + "," + i + "," + (i * (100-i) * 100/(50*50)) + "\n"; | |
28 | } | |
29 | return ret; | |
30 | }, | |
31 | { fillGraph: true } | |
32 | ); | |
33 | ||
34 | new Dygraph( | |
35 | document.getElementById("div_g3"), | |
36 | function() { | |
37 | var ret = "X,Y1,Y2\n"; | |
38 | for (var i = 0; i < 100; i++) { | |
39 | ret += i + "," + (i - 50) + | |
40 | "," + (50 - i * (100-i) * 100/(50*50)) + "\n"; | |
41 | } | |
42 | return ret; | |
43 | }, | |
44 | { fillGraph: true } | |
45 | ); | |
46 | ||
47 | new Dygraph( | |
48 | document.getElementById("div_g2"), | |
49 | function() { | |
50 | var ret = "X,Y1,Y2\n"; | |
51 | for (var i = 0; i < 100; i++) { | |
52 | ret += i + "," + i + ",10," + | |
53 | (i * (100-i) * 100/(50*50)) + ",5\n"; | |
54 | } | |
55 | return ret; | |
56 | }, | |
57 | { | |
58 | errorBars: true, | |
59 | fillGraph: true | |
60 | } | |
61 | ); | |
62 | </script> | |
63 | </body> | |
64 | </html> |