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