5 <script type=
"text/javascript" src=
"excanvas.js"></script>
7 <script type=
"text/javascript" src=
"../strftime/strftime-min.js"></script>
8 <script type=
"text/javascript" src=
"../rgbcolor/rgbcolor.js"></script>
9 <script type=
"text/javascript" src=
"../dygraph-canvas.js"></script>
10 <script type=
"text/javascript" src=
"../dygraph.js"></script>
14 <div id=
"simple_div"></div>
16 <div id=
"stacked_div"></div>
17 <p>Simple graph with missing data:
</p>
18 <div id=
"simple_missing_div"></div>
19 <p>Stacked graph with missing data:
</p>
20 <div id=
"stacked_missing_div"></div>
21 <p>Stacked graph with many series:
</p>
22 <div id=
"stacked_many_div"></div>
24 <script type=
"text/javascript">
26 for (var i =
0; i <
100; i++) {
27 data += i +
"," + i +
"," + (
100 - i) +
"\n";
30 new Dygraph(document.getElementById(
"simple_div"),
32 new Dygraph(document.getElementById(
"stacked_div"),
34 { stackedGraph: true });
36 missing_data =
"X,x,100-x\n";
37 for (var i =
0; i <
100; i++) {
38 if (i
>=
20 && i <
40) {
39 missing_data += i +
",," + (
100 - i) +
"\n";
40 } else if (i
>=
60 && i <
80) {
41 missing_data += i +
"," + i +
",\n";
43 missing_data += i +
"," + i +
"," + (
100 - i) +
"\n";
47 new Dygraph(document.getElementById(
"simple_missing_div"),
49 new Dygraph(document.getElementById(
"stacked_missing_div"),
51 { stackedGraph: true });
53 many_data =
"X,a,b,c,d,e,100-a,100-b,100-c,100-d,100-e\n";
54 for (var i =
0; i <
100; i++) {
55 many_data += i +
"," + i +
"," + i +
"," + i +
"," + i +
"," + i;
57 many_data +=
"," + j +
"," + j +
"," + j +
"," + j +
"," + j;
61 new Dygraph(document.getElementById(
"stacked_many_div"),
63 { stackedGraph: true });