Remove naming of anoymous functions. Unnecessary and slightly wrong.
[dygraphs.git] / tests / fillGraph.html
CommitLineData
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
e2d8db3a
DV
23 <p>Filled on a per-series basis:</p>
24 <div id="div_g3" style="width:600px; height:300px;"></div>
25
87c1f382 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 );
e2d8db3a
DV
51
52 var g3 = new Dygraph(
53 document.getElementById("div_g3"),
54 function() {
55 var ret = "X,Y1,Y2\n";
56 for (var i = 0; i < 100; i++) {
57 ret += i + "," + i + "," + (i * (100-i) * 100/(50*50)) + "\n";
58 }
59 return ret;
60 },
61 {
62 Y1: { fillGraph: true }
63 }
64 );
87c1f382
DV
65 </script>
66 </body>
67</html>