4 <link rel=
"stylesheet" href=
"../dist/dygraph.css">
5 <title>label-div
</title>
6 <script type=
"text/javascript" src=
"../dist/dygraph.js"></script>
8 <script type=
"text/javascript" src=
"data.js"></script>
11 <p>Chart with labels displayed in a separate div:
</p>
13 <td valign=
"top"><div id=
"graphdiv2"></div></td>
14 <td valign=
"top"> </td>
15 <td valign=
"top"><div id=
"labels"></div></td>
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:
24 <td valign=
"top"><div id=
"graphdiv3"></div></td>
25 <td valign=
"top"> </td>
26 <td valign=
"top"><div id=
"labels2"></div></td>
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.
35 <td valign=
"top"><div id=
"graphdiv4"></div></td>
36 <td valign=
"top"> </td>
37 <td valign=
"top"><div id=
"labels3"></div></td>
40 <script type=
"text/javascript">
41 g2 = new Dygraph(document.getElementById(
"graphdiv2"),
44 labels: [
"Date",
"High",
"Low" ],
45 labelsDiv: document.getElementById(
"labels")
47 g3 = new Dygraph(document.getElementById(
"graphdiv3"),
50 labels: [
"Date",
"High",
"Low" ],
53 g4 = new Dygraph(document.getElementById(
"graphdiv4"),
56 labels: [
"Date",
"High",
"Low" ],
58 labelsShowZeroValues: false