4 <title>Milliseconds date labels
</title>
6 For production (minified) code, use:
7 <script type=
"text/javascript" src=
"dygraph-combined.js"></script>
9 <script type=
"text/javascript" src=
"../dist/dygraph.js"></script>
13 <h2>Milliseconds display in date and time labels
</h2>
15 <p>This shows how milliseconds are displayed when present.
</p>
17 <div id=
"div_ms" style=
"width:600px; height:200px;"></div>
18 <div id=
"div_std" style=
"width:600px; height:200px;"></div>
20 <p>You can check it by hovering over corresponding points and comparing
23 <script type=
"text/javascript">
24 var values = (function () {
25 var rand10 = function () { return Math.round(
10 * Math.random()); };
27 for (var n=
0; n <
72; n++) {
32 function data(y,m,d,hh,mm,ss,ms) {
34 for (var n=
0; n <
72; n++) {
35 a.push([new Date(Date.UTC(y, m, d, hh + n, mm, ss, ms)), values[n]]);
40 document.getElementById(
"div_ms"),
41 data(
2009,
6,
25,
14,
34,
56,
654),
43 labels: ['time with ms', 'random']
47 document.getElementById(
"div_std"),
48 data(
2009,
6,
25,
14,
0,
0,
0),
50 labels: ['time', 'random']