projects
/
dygraphs.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
52ca228
)
Always set milliseconds to zero when computing date tick placement, so that resulting...
author
Adam Vartanian
<flooey@gmail.com>
Wed, 11 Apr 2012 18:56:38 +0000
(14:56 -0400)
committer
Adam Vartanian
<flooey@gmail.com>
Wed, 11 Apr 2012 18:56:38 +0000
(14:56 -0400)
dygraph-tickers.js
patch
|
blob
|
blame
|
history
diff --git
a/dygraph-tickers.js
b/dygraph-tickers.js
index
41e60e4
..
b331de8
100644
(file)
--- a/
dygraph-tickers.js
+++ b/
dygraph-tickers.js
@@
-330,7
+330,7
@@
Dygraph.getDateAxis = function(start_time, end_time, granularity, opts, dg) {
// Find a time less than start_time which occurs on a "nice" time boundary
// for this granularity.
var g = spacing / 1000;
- var d = new Date(start_time);
+ var d = new Date(start_time)
.setMilliseconds(0)
;
var x;
if (g <= 60) { // seconds
x = d.getSeconds(); d.setSeconds(x - x % g);