4 <link rel=
"stylesheet" href=
"../dist/dygraph.css">
6 <script type=
"text/javascript" src=
"../dist/dygraph.js"></script>
11 <div id=
"simple_div"></div>
13 <div id=
"stacked_div"></div>
14 <p>Simple graph with missing data:
</p>
15 <div id=
"simple_missing_div"></div>
16 <p>Stacked graph with missing data:
</p>
17 <div id=
"stacked_missing_div"></div>
18 <p>Stacked graph with many series:
</p>
19 <div id=
"stacked_many_div"></div>
20 <p>Change selection/highlighting on all graphs:
</p>
21 <div id=
"graph_selection_div">
22 <select onchange=
"javascript:setSelection(this.options[this.selectedIndex].value);">
23 <option value=
"" selected
></option>
24 <option value=
"0">0</option>
25 <option value=
"10">10</option>
26 <option value=
"20">20</option>
27 <option value=
"30">30</option>
28 <option value=
"40">40</option>
29 <option value=
"50">50</option>
30 <option value=
"60">60</option>
31 <option value=
"70">70</option>
32 <option value=
"80">80</option>
33 <option value=
"90">90</option>
34 <option value=
"99">99</option>
38 <script type=
"text/javascript">
40 for (var i =
0; i <
100; i++) {
41 data += i +
"," + i +
"," + (
100 - i) +
"\n";
48 document.getElementById(
"simple_div"),
53 document.getElementById(
"stacked_div"),
55 { stackedGraph: true }));
57 missing_data =
"X,x,100-x\n";
58 for (var i =
0; i <
100; i++) {
59 if (i
>=
20 && i <
40) {
60 missing_data += i +
",," + (
100 - i) +
"\n";
61 } else if (i
>=
60 && i <
80) {
62 missing_data += i +
"," + i +
",\n";
64 missing_data += i +
"," + i +
"," + (
100 - i) +
"\n";
70 document.getElementById(
"simple_missing_div"),
75 document.getElementById(
"stacked_missing_div"),
77 { stackedGraph: true }));
79 many_data =
"X,a,b,c,d,e,100-a,100-b,100-c,100-d,100-e\n";
80 for (var i =
0; i <
100; i++) {
81 many_data += i +
"," + i +
"," + i +
"," + i +
"," + i +
"," + i;
83 many_data +=
"," + j +
"," + j +
"," + j +
"," + j +
"," + j;
89 document.getElementById(
"stacked_many_div"),
91 { stackedGraph: true }));
93 function setSelection(row) {
94 for (var i =
0; i < graphs.length; i++) {
95 graphs[i].setSelection(row ? row : false);