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