Bug fix for dygraph point selection touch event.
[dygraphs.git] / tests / label-div.html
CommitLineData
54425b14 1<!DOCTYPE html>
285a6bda
DV
2<html>
3 <head>
fd6b8dad 4 <link rel="stylesheet" href="../dist/dygraph.css">
6f091595 5 <title>label-div</title>
fbd6834a 6 <script type="text/javascript" src="../dist/dygraph.js"></script>
7e5ddc94 7
285a6bda
DV
8 <script type="text/javascript" src="data.js"></script>
9 </head>
10 <body>
11 <p>Chart with labels displayed in a separate div:</p>
12 <table><tr>
13 <td valign="top"><div id="graphdiv2"></div></td>
14 <td valign="top">&nbsp; &nbsp;</td>
15 <td valign="top"><div id="labels"></div></td>
16 </tr></table>
52fe05c1
SJ
17 <p>
18 The following chart should be the same as above. Here we use the
19 labelsDiv id instead of the actual labelsDiv element.<br/>This is
20 useful when the labelsDiv element has not been attached to the
21 DOM when the chart/options is created:
22 </p>
23 <table><tr>
24 <td valign="top"><div id="graphdiv3"></div></td>
25 <td valign="top">&nbsp; &nbsp;</td>
26 <td valign="top"><div id="labels2"></div></td>
27 </tr></table>
28 <p>
29 The following chart shows the labelsShowZeroValues option in use.
30 When any point has a zero value the label is not shown. This is
31 useful when there are many zero values in a point and the user
32 is only interested in the non-zero points.
33 </p>
34 <table><tr>
35 <td valign="top"><div id="graphdiv4"></div></td>
36 <td valign="top">&nbsp; &nbsp;</td>
37 <td valign="top"><div id="labels3"></div></td>
38 </tr></table>
285a6bda
DV
39
40 <script type="text/javascript">
41 g2 = new Dygraph(document.getElementById("graphdiv2"),
42 data_nolabel,
43 {
5011e7a1 44 labels: [ "Date", "High", "Low" ],
285a6bda
DV
45 labelsDiv: document.getElementById("labels")
46 });
52fe05c1
SJ
47 g3 = new Dygraph(document.getElementById("graphdiv3"),
48 data_nolabel,
49 {
50 labels: [ "Date", "High", "Low" ],
51 labelsDiv: "labels2"
52 });
53 g4 = new Dygraph(document.getElementById("graphdiv4"),
54 data_showzerovalues,
55 {
56 labels: [ "Date", "High", "Low" ],
57 labelsDiv: "labels3",
58 labelsShowZeroValues: false
59 });
285a6bda
DV
60 </script>
61 </body>
62</html>