projects
/
dygraphs.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fixed attribute name typo in legend follow (#792)
[dygraphs.git]
/
tests
/
x-axis-formatter.html
diff --git
a/tests/x-axis-formatter.html
b/tests/x-axis-formatter.html
index
9983391
..
63b9e05
100644
(file)
--- a/
tests/x-axis-formatter.html
+++ b/
tests/x-axis-formatter.html
@@
-1,16
+1,13
@@
<!DOCTYPE html>
<html>
<head>
<!DOCTYPE html>
<html>
<head>
- <
meta http-equiv="X-UA-Compatible" content="IE=EmulateIE7; IE=EmulateIE9
">
+ <
link rel="stylesheet" href="../css/dygraph.css
">
<title>X Axis Label Formatting</title>
<title>X Axis Label Formatting</title>
- <!--[if IE]>
- <script type="text/javascript" src="../excanvas.js"></script>
- <![endif]-->
<!--
For production (minified) code, use:
<script type="text/javascript" src="dygraph-combined.js"></script>
-->
<!--
For production (minified) code, use:
<script type="text/javascript" src="dygraph-combined.js"></script>
-->
- <script type="text/javascript" src="../d
ygraph-dev
.js"></script>
+ <script type="text/javascript" src="../d
ist/dygraph
.js"></script>
</head>
<body>
</head>
<body>
@@
-35,6
+32,9
@@
"2009/07/12 05:00:00,3,6\n" +
"2009/07/12 06:00:00,4,6"
}
"2009/07/12 05:00:00,3,6\n" +
"2009/07/12 06:00:00,4,6"
}
+ function zeropad(x) {
+ return (x < 10) ? '0' + x : x;
+ }
var g1 = new Dygraph(
document.getElementById("normal"),
var g1 = new Dygraph(
document.getElementById("normal"),
@@
-58,13
+58,13
@@
document.getElementById("seconds"),
HourlyData(),
{
document.getElementById("seconds"),
HourlyData(),
{
- xAxisLabelWidth: 70,
axes: {
x: {
axes: {
x: {
+ axisLabelWidth: 70,
axisLabelFormatter: function(d, gran) {
axisLabelFormatter: function(d, gran) {
- return
Dygraph.
zeropad(d.getHours()) + ":"
- +
Dygraph.
zeropad(d.getMinutes()) + ":"
- +
Dygraph.
zeropad(d.getSeconds());
+ return zeropad(d.getHours()) + ":"
+ + zeropad(d.getMinutes()) + ":"
+ + zeropad(d.getSeconds());
}
}
}
}
}
}