4 <link rel=
"stylesheet" href=
"../css/dygraph.css">
7 For production (minified) code, use:
8 <script type=
"text/javascript" src=
"dygraph-combined.js"></script>
10 <script type=
"text/javascript" src=
"../dist/dygraph.js"></script>
15 <div id=
"simple_div"></div>
17 <div id=
"stacked_div"></div>
18 <p>Simple graph with missing data:
</p>
19 <div id=
"simple_missing_div"></div>
20 <p>Stacked graph with missing data:
</p>
21 <div id=
"stacked_missing_div"></div>
22 <p>Stacked graph with many series:
</p>
23 <div id=
"stacked_many_div"></div>
24 <p>Change selection/highlighting on all graphs:
</p>
25 <div id=
"graph_selection_div">
26 <select onchange=
"javascript:setSelection(this.options[this.selectedIndex].value);">
27 <option value=
"" selected
></option>
28 <option value=
"0">0</option>
29 <option value=
"10">10</option>
30 <option value=
"20">20</option>
31 <option value=
"30">30</option>
32 <option value=
"40">40</option>
33 <option value=
"50">50</option>
34 <option value=
"60">60</option>
35 <option value=
"70">70</option>
36 <option value=
"80">80</option>
37 <option value=
"90">90</option>
38 <option value=
"99">99</option>
42 <script type=
"text/javascript">
44 for (var i =
0; i <
100; i++) {
45 data += i +
"," + i +
"," + (
100 - i) +
"\n";
52 document.getElementById(
"simple_div"),
57 document.getElementById(
"stacked_div"),
59 { stackedGraph: true }));
61 missing_data =
"X,x,100-x\n";
62 for (var i =
0; i <
100; i++) {
63 if (i
>=
20 && i <
40) {
64 missing_data += i +
",," + (
100 - i) +
"\n";
65 } else if (i
>=
60 && i <
80) {
66 missing_data += i +
"," + i +
",\n";
68 missing_data += i +
"," + i +
"," + (
100 - i) +
"\n";
74 document.getElementById(
"simple_missing_div"),
79 document.getElementById(
"stacked_missing_div"),
81 { stackedGraph: true }));
83 many_data =
"X,a,b,c,d,e,100-a,100-b,100-c,100-d,100-e\n";
84 for (var i =
0; i <
100; i++) {
85 many_data += i +
"," + i +
"," + i +
"," + i +
"," + i +
"," + i;
87 many_data +=
"," + j +
"," + j +
"," + j +
"," + j +
"," + j;
93 document.getElementById(
"stacked_many_div"),
95 { stackedGraph: true }));
97 function setSelection(row) {
98 for (var i =
0; i < graphs.length; i++) {
99 graphs[i].setSelection(row ? row : false);