I use Flot to display some data that I wrap from the server. The data I received on the X axis are in units of milliseconds, and I want to display a graph with the X axis in seconds. So, I thought it was useful to use the transform axis API option. I applied my conversion like this:
var plot = $.plot($("#placeholder"), { grid: { hoverable: true, clickable: true }, xaxis: { transform: function(x) { return x/1000; } } });
I see that my conversion function is called by the wireframe, and I see that the points themselves are transformed - when I attach the plothover event and hover over the points, I see that the X value is converted accordingly. The problem is that the label marks on the x axis also do not convert.
What do I need to do to convert the axis labels themselves to my data?
jquery flot
Chris Farmer May 04 '10 at 7:26 a.m. 2010-05-04 19:26
source share