Set this for drawCallback
[dygraphs.git] / tests / fillGraph.html
CommitLineData
54425b14 1<!DOCTYPE html>
87c1f382
DV
2<html>
3 <head>
4 <title>fillGraph</title>
7e5ddc94
DV
5 <!--
6 For production (minified) code, use:
7 <script type="text/javascript" src="dygraph-combined.js"></script>
8 -->
9 <script type="text/javascript" src="../dygraph-dev.js"></script>
10
87c1f382
DV
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
e2d8db3a
DV
19 <p>Filled on a per-series basis:</p>
20 <div id="div_g3" style="width:600px; height:300px;"></div>
21
87c1f382 22 <script type="text/javascript">
f6fbf9e0 23 var g1 = new Dygraph(
87c1f382
DV
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
f6fbf9e0 35 var g2 = 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 );
e2d8db3a
DV
47
48 var g3 = new Dygraph(
49 document.getElementById("div_g3"),
50 function() {
51 var ret = "X,Y1,Y2\n";
52 for (var i = 0; i < 100; i++) {
53 ret += i + "," + i + "," + (i * (100-i) * 100/(50*50)) + "\n";
54 }
55 return ret;
56 },
57 {
27fd63fc
DV
58 series: {
59 Y1: { fillGraph: true }
60 }
e2d8db3a
DV
61 }
62 );
87c1f382
DV
63 </script>
64 </body>
65</html>