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