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