Reputation: 11
I'm trying to use flot to graph data and have the time for data along the x axis. The graph works fine until I add time mode in the options. Everything I've seen says the problem is the time stamp but I've converted it to the Javascript time stamp. Here is the code I have.
var data = [[1272701100000,2.475],[1272701400000,2.475],[1272701700000,2.475],[1272702000000,2.7],[1272702300000,2.745],[1272702600000,2.7],[1272702900000,2.565],[1272703200000,2.475],[1272703500000,2.385],[1272703800000,2.52]];
var options = {xaxis: {
mode: "time"
}};
$.plot("#placeholder",[data]);
Upvotes: 1
Views: 564
Reputation: 17550
Works fine when you include the Flot time plugin: updated fiddle
Error was in the console:
Error: Time mode requires the flot.time plugin.
Upvotes: 1