Commit | Line | Data |
---|---|---|
f18fd545 DV |
1 | <!DOCTYPE html> |
2 | <html> | |
3 | <head> | |
fd6b8dad | 4 | <link rel="stylesheet" href="../dist/dygraph.css"> |
f18fd545 | 5 | <title>crosshairs</title> |
fbd6834a | 6 | <script type="text/javascript" src="../dist/dygraph.js"></script> |
f18fd545 | 7 | |
8b5752f9 | 8 | <script type="text/javascript" src="../src/extras/crosshair.js"></script> |
f18fd545 DV |
9 | <script type="text/javascript" src="data.js"></script> |
10 | </head> | |
11 | <body> | |
56a1e060 PS |
12 | <p>Vertical crosshair:</p> |
13 | <div id="div_g_v" style="width:600px; height:300px; position:relative;"> | |
f18fd545 DV |
14 | </div> |
15 | ||
56a1e060 PS |
16 | <p>Horizontal crosshairs:</p> |
17 | <div id="div_g_h" style="width:600px; height:300px; position:relative;"> | |
18 | </div> | |
f18fd545 | 19 | |
56a1e060 PS |
20 | <p>Both crosshairs:</p> |
21 | <div id="div_g_b" style="width:600px; height:300px; position:relative;"> | |
22 | </div> | |
23 | ||
24 | <script type="text/javascript"> | |
25 | gv = new Dygraph( | |
26 | document.getElementById("div_g_v"), | |
27 | NoisyData, | |
28 | { | |
29 | rollPeriod: 7, | |
30 | showRoller: true, | |
31 | errorBars: true, | |
f18fd545 | 32 | |
56a1e060 PS |
33 | plugins: [ |
34 | new Dygraph.Plugins.Crosshair({ | |
35 | direction: "vertical" | |
36 | }) | |
37 | ] | |
38 | } | |
39 | ); | |
40 | gh = new Dygraph( | |
41 | document.getElementById("div_g_h"), | |
42 | NoisyData, { | |
43 | rollPeriod: 7, | |
44 | showRoller: true, | |
45 | errorBars: true, | |
f18fd545 | 46 | |
56a1e060 PS |
47 | plugins: [ |
48 | new Dygraph.Plugins.Crosshair({ | |
49 | direction: "horizontal" | |
50 | }) | |
51 | ] | |
52 | } | |
53 | ); | |
54 | gb = new Dygraph( | |
55 | document.getElementById("div_g_b"), | |
56 | NoisyData, { | |
57 | rollPeriod: 7, | |
58 | showRoller: true, | |
59 | errorBars: true, | |
f18fd545 | 60 | |
56a1e060 PS |
61 | plugins: [ |
62 | new Dygraph.Plugins.Crosshair({ | |
63 | direction: "both" | |
64 | }) | |
65 | ] | |
66 | } | |
67 | ); | |
f18fd545 DV |
68 | </script> |
69 | </body> | |
70 | </html> |