Closed GoogleCodeExporter closed 8 years ago
[deleted comment]
try:
xaxis: {
mode: "time",
//minTickSize: [1, "day"],
//timeformat: "%y/%m/%d"
},
It's because UTC time using in Flot.
And all your Date ,if time in your machine not like GMT-0, get change.
For example my time is UTC+04:00, and flot get
2010/08/26 - 4 hours and show me first point in 2010/08/25 20:00 !
If your want to fix it, replace all 'UTC' to '' (ex. getUTCSeconds to
getSeconds) in jquery.flot.js !
Original comment by zniki...@gmail.com
on 28 Sep 2011 at 12:07
Thanks a lot! Perfect!
Original comment by jorge.mu...@gmail.com
on 28 Sep 2011 at 12:20
Thanks
Original comment by grantamaral
on 2 Feb 2012 at 4:29
Original comment by dnsch...@gmail.com
on 30 Apr 2012 at 2:38
[deleted comment]
I have done exactly the same by removing the UTC string, but still the x-axis
is not aligned with the plotted point. I have even tried the last version of
flot with the time flot library, and still the same and using timezone:
"browser".
This is my options array:
var options = {
series: {
lines: {
show: true
},
points: {
show: true
}
},
grid: {
hoverable: true,
clickable: true
},
xaxis: {
mode: "time",
timeformat: "%d/%m",
tickSize: [1, "day"]
},
yaxis: {
min: 0
},
legend: {
show: false
},
selection: {
mode: "x"
}
};
and the data is a simple new Date(someDateArray[i])).getTime().
==
Is there any other work around this phenomenon?
Original comment by Alb...@gmail.com
on 12 Jul 2012 at 4:33
Attachments:
I fixed this by using the function Date.UTC(year,month,day,...)!!
Original comment by Alb...@gmail.com
on 12 Jul 2012 at 9:16
using this option
timezone:"browser"
Original comment by hamelm...@gmail.com
on 21 Aug 2013 at 8:27
this is very good
!
Original comment by peak...@gmail.com
on 25 May 2015 at 6:25
Original issue reported on code.google.com by
jorge.mu...@gmail.com
on 27 Sep 2011 at 6:35Attachments: