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