Closed GoogleCodeExporter closed 8 years ago
Any ideas anyone?
Original comment by joelough...@gmail.com
on 2 Feb 2010 at 7:58
Hello,
On axis options you can use ticks options to specify with a Javascript Array
which
ticks do you want to show and its labels.
It's not as easy as automatic ticks with timeformat. But you can model what you
say
using javascript.
Also you can get the axis data with getAxes() and then create your array.
It's a little bit tricky for an easy situation (show day names) but is an
option and
it works.
Original comment by jordi.ks...@gmail.com
on 26 Mar 2010 at 12:19
For those of you that are interested.
I solved this problem by adapting the jsDate code found here:
http://slingfive.com/pages/code/jsDate/jsDate.html
I had to change all the date functions to use the UTC functions to get timezones
working right.
In flot it was just a matter of using a Tic formatter, that creates and
displays the
appropriate date format depending on the current x-axis range.
tickFormatter: function (val, axis) {
var range = axis.max - axis.min;
if (range < 2*24*60*60*1000)
return Date.Format(val, "h:nn");
if (range < 5*24*60*60*1000)
return Date.Format(val, "ddd hh:nn");
if (range < 10*24*60*60*1000)
return Date.Format(val, "ddd mmm d");
if (range < 31*24*60*60*1000)
return Date.Format(val, "mmm d");
return Date.Format(val, "mmm d, yyyy");
}
Original comment by joelough...@gmail.com
on 28 Mar 2010 at 9:43
There was also a patch for Flot posted here:
http://groups.google.com/group/flot-graphs/browse_thread/thread/aa2154b22b5d60c1
Original comment by olau%iol...@gtempaccount.com
on 14 Apr 2010 at 11:25
Original comment by dnsch...@gmail.com
on 8 May 2012 at 12:11
This was fixed in
https://github.com/flot/flot/commit/a54ec4ad64311f13e4d75cd67f4d77c4906456d1
when date formatting was standardized.
Original comment by mrcote
on 3 Dec 2012 at 5:42
Original issue reported on code.google.com by
joelough...@gmail.com
on 20 Jan 2010 at 8:56