4 <title>Milliseconds date labels
</title>
5 <script type=
"text/javascript" src=
"../dist/dygraph.js"></script>
9 <h2>Milliseconds display in date and time labels
</h2>
11 <p>This shows how milliseconds are displayed when present.
</p>
13 <div id=
"div_ms" style=
"width:600px; height:200px;"></div>
14 <div id=
"div_std" style=
"width:600px; height:200px;"></div>
16 <p>You can check it by hovering over corresponding points and comparing
19 <script type=
"text/javascript">
20 var values = (function () {
21 var rand10 = function () { return Math.round(
10 * Math.random()); };
23 for (var n=
0; n <
72; n++) {
28 function data(y,m,d,hh,mm,ss,ms) {
30 for (var n=
0; n <
72; n++) {
31 a.push([new Date(Date.UTC(y, m, d, hh + n, mm, ss, ms)), values[n]]);
36 document.getElementById(
"div_ms"),
37 data(
2009,
6,
25,
14,
34,
56,
654),
39 labels: ['time with ms', 'random']
43 document.getElementById(
"div_std"),
44 data(
2009,
6,
25,
14,
0,
0,
0),
46 labels: ['time', 'random']